You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I realized that there is a slight hiccup in the blocking execution when ordered=true, since they are not directly scheduled for execution immediately, a task scheduled on the ContextScheduler might run after a task run with Context::executeBlocking even if the one on the ContextScheduler was scheduled first. This is even worse when dealing with a WorkerExecutor as that gets wrapped with a runOnContext to ensure it is scheduled with the ordering of the context.
Personally I think allowing a ContextWorker to be accessed across multiple contexts adds unnecessary complexity and I'm not sure if it is something that is necessary I'm completely sure that it breaks the Vert.x concurrency model. I'm only assuming the behavior was sort of expected because in the previous implementation of the scheduler, the context was retrieved at the creation of every TimedAction not at the creation of the ContextWorker.
The more I think about this the more I think I've thought and now concluded that TaskQueue support for WorkerExecutor is required and I need to be able to supply a WorkerExecutor a context to use when I schedule instead of it getting the context from the thread
Also, I realized I should have used ((ContextInternal)this.context).setTimer instead of this.context.owner().setTimer. I need to make a handful of changes to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ContextSchedulerto conform to specTaskQueuebut that requires work on coreContexttoWorkerExecutor::executeBlockingbut requires work on coreWorkerFixes #245