-
Notifications
You must be signed in to change notification settings - Fork 19
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
Schedulers don't appear to be workingfor me, tried several configurations. #9
Comments
Hi @garethhu, I'm not sure if I understand what you are trying to achieve and I also cannot execute your code because I do not have an access to the
Consider using just:
But to answer your question I can clarify some things about schedulers in Rocket package. They are indeed considered to be an experimental feature and poorly documented. But in any case What you can probably try is to use
It synchronously adds incoming messages and subscriptions to one single queue. You can release queue with |
I have two functions that deal with adding to the subject
function source!(src::Source{T}) where T Subject(T, scheduler = AsyncScheduler()) do subject start_consume!(src, subject) end end
function start_consume!(src::Source{T}, consumer) where T while true msg = src.pollFn() if !isnothing(msg) next!(consumer, msg) else yield() end end end
When I replace
Subject(T, scheduler = AsyncScheduler())
withmake(T)
everything works. However I want to run multiple queues on the same scheduler, I have tried running queues by looping through them and using@spawn
and this didn't work it ran the first queue but the second did not execute at all. Consequently, my new approach is to give both queues the same scheduler so that the work is distributed between them. But currently, I can't get one queue running with a scheduler.The text was updated successfully, but these errors were encountered: