Implement sleep for the chapter 5 fiber#39
Implement sleep for the chapter 5 fiber#39Genaro-Chris wants to merge 1 commit intoPacktPublishing:mainfrom
Conversation
|
This is a cool experiment. One challenge I see is that you sleep by actually putting the main thread to sleep, so that means that nothing can be done while a task is sleeping. Am I correct? The challenge here would be to implement a sleep that doesn't put the main thread to sleep. For example the Or you could introduce a new state for the tasks, for example |
|
Yeah, you're right but I chose this method because it was the most naive or toy implementation I could think of. I can't really implement it efficiently right now for some reasons |
No description provided.