Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deferred option for cxy_ctl #28

Open
jaynel opened this issue Apr 24, 2014 · 0 comments
Open

Add deferred option for cxy_ctl #28

jaynel opened this issue Apr 24, 2014 · 0 comments

Comments

@jaynel
Copy link
Member

jaynel commented Apr 24, 2014

gen_stream used buffer striping that was driven by access. New concurrent process didn't execute until there was enough demand. This can be done programmatically by the user with maybe_execute_task.

Using a 'deferred' option so that up to a Max of spawns occurs, after which the spawning mechanism pauses until below Max before allowing the next to start. This involves maintaining Max processes running and a queue of deferred processes (the queue is the synchronization barrier).

Another option is to spawn as often as is needed, but to not start computation when over the Max. Processes could only proceed when given a signal to do so. This in itself is a form of synchronization.

The 2nd option allows for a more general implementation of synchronization barriers at the expense of more processes and more memory, but they are quicker to start running having already amortized the spawn cost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant