Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
add support for naming tasks, so that they can't be scheduled twice #1
A couple comments.
The main reason for this was to solve the problem of which node amongst many would schedule the long running tasks on launch.
While it might be a faster lookup to put the Name -> Pid mapping in a gb_tree or dict, it's a hassle to delete the name if the task is later deleted via pid.
With the current implementation, if you don't use names, you don't pay for them.
This is a useful feature, thanks for the submission. I've a few suggestions/fixes before merging this in:
I've updated the README.md to include instructions for running all tests and the static analysis.
New commit with requested updates.
The CT tests seemed to pass before, so there might be something wrong with my setup. I'm running Erlang R14B04.
There were a couple other errors in the dialzyer output regarding run_tasks() never returning when using a sleeper task. I think those were already there though. If not, I could use a hint on how I could have introduced that.
Yes the run_tasks warnings are expected. Dialyzer doesn't like that for some inputs run_tasks never returns (periodic tasks) for some it does return (oneshot). Normally that type of behaviour would indicate a programming error. If you run dialyzer via the Makefile (
I pulled down your change locally and fixed the common test (see
I also cleaned up a few other minor things like ensuring the line lengths were not > 80 characters. I've pushed our combined changes to master.
Thanks for the submission!