-
Notifications
You must be signed in to change notification settings - Fork 250
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
fix(core): allow parallel schedules #3485
Conversation
* Represents a work item: an input with a task and with a `result$` observable where the result (exactly one) will be streamed to. | ||
*/ | ||
class WorkItem<TResource extends Resource, TIn, TOut> { | ||
private readonly resultSubject = new Subject<TOut>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick: we could also use _result$
as a name to signal it's the private version of result$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with regards to naming: if a Subject is not exposed as an Observable, I think the name Subject
can be removed from the variable name all together (see class Pool
)
@simondel I've implemented some of the review comments and did even more improvements (made the Let's talk tomorrow about the naming standard. I tried to be consistent:
|
Fix a race condition in the
Pool
class. Previously, parallel calls to.schedule()
were not supported, this PR fixes it by adding some bookkeeping to keep track of work being done in otherschedule
calls.Fixes #3473