Manuscript (Case [Issue]22477) Kernel - DelayScheduler cleanup and refactoring

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]22477) Kernel - DelayScheduler cleanup and refactoring

Pharo Issue Tracker
Manuscript Notification
avatar
Cleanup in Project:  Kernel: 1. Pharo Image  •  You are subscribed to this case
There's a bug in DelaySemaphoreScheduler.
1. add missing #signal send to DelaySemaphoreScheduler>>timingPriorityHandleEvent
2. (copied from Discourse with Ben)
I think I have it. When I switch the two lines in DelaySemaphoreScheduler>>schedule: the tests work fine. The problem is that when a delay is being scheduled more than once, which is illegal, that check would only be performed in the super implementation, which is never reached because the process is stuck on the #wait send.
I'm not sure, whether your idea was to use the semaphore instead of that check. In that case, the cause of the problem appears to be that Delay>>wait does not use #ensure: to send #unschedule but #ifCurtailed. Hence, the expectation that #schedule and #unschedule are symmetric is wrong. So for the semaphore to take on that guard role we'd have to ensure that #unschedule is sent. I've experimentally added as last line aDelay unschedule to #timingPriorityUnschedule:` and that appears to resolve all issues.
Priority Priority: 3 – Must Fix Status Status: Resolved (Fix Review Needed)
Assigned To Assigned to: Ben Coman Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker