Skip to content

Re-implement scheduler's related code #277

Description

@AlexInLog

UPD:

  1. Split TrampolineScheduler into two:
    1. TrampolineScheduler which JUST TRAMPOLINE with LOCAL queue to just schedule "schedulable after current schedulable completed"
    2. CurrentThreadScheduler = TrampolineScheduler with thread_local queues
  2. Re-implement scheduler's based operators in the following way:
    1. Instead of "just scheduling" each emission to scheduler it needs to have local queue
    2. On new emission push emission to queue
    3. If queue is empty, then schedule draining of queue to scheduler
    4. If queue is not empty, then just do nothing due to "someone else" just scheduled draining
    5. Recursively re-schedule same schedulable to drain queue while queue is not empty.
  3. (????) NewThread/RunLoop and etc should store their queues as "CurrentThread" or not?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions