-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ActorTaskScheduler QueueTask for LongRunning #1410
Comments
The Cancled Check is missing at line65 |
Can you confirm this bug with a Test/Spec ? |
I created a Spec, but of couse it is failing. There are multiple possible options for the ActorTaskScheduler
|
@Zetanova so your spec proves definitively that this is an issue. What's the appropriate fix? |
@Zetanova your right about the check on line 65. That should include the IsCanceled check. However i'm not sure what you mean with the possible options for the ActorTaskScheduler. As in, how would that solve the problem? |
Currently the ActorTaskScheduler is executing all task-types with the help of the CompleteTask-Message. if currently something is requesting a LongRunning Task, it will probably lock the actor with it. If something requires a Long Running Task for lets say an infinit message loop I didn't thought it through but maybe the ActorTaskScheduler can behave like the normal TaskPoolScheduler for all Task-types beside TaskCreationOptions.AttachedToParent The ActorTaskScheduler schould allways create a new thread for the a LongRunning -Task |
I'm a bit confused by the comments and commits in this issue. ActorTaskScheduler's purpose is to execute a task in the Actor's context, it make sense to spin a thread when the flag LongRunning is set, but it does not make sense to execute a task outside the actor context ever. See Issue #1481 and PR #1482, I implemented the LongRunning flag. |
Some external Sources are lazy initializing background threads with the LongRunning Task hint.
Like with RX Subject on the first OnNext()
With the current ActorTaskScheduler behavior the actor will lock at Line64 TryExecuteTask(task);
The deault behavir of the TaskPoolScheduler would be to start a detached explicit Thread for this Task.
The text was updated successfully, but these errors were encountered: