Created
March 8, 2026 08:30
-
-
Save irridescentrambler/a5d92a5a1bdfb2892585d26d4d1a5ada to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| worker = nil | |
| manager = Fiber.new do |work_for_manager| | |
| puts "Manager starting the work" | |
| puts "Doing the work...(Manager)" | |
| puts work_for_manager | |
| puts "Ending the work..(Manager)" | |
| worker.transfer("Do this now - Manager") | |
| puts "Approving - Manager" | |
| puts "Manager logging off" | |
| worker.transfer | |
| end | |
| worker = Fiber.new do |work_for_employee| | |
| puts "Worker starting the work" | |
| puts "Doing the work..(Worker)" | |
| puts work_for_employee | |
| puts "Ending the work..(Worker)" | |
| manager.transfer("Work is completed. Please approve the PR - Worker") | |
| puts "Worker logging off" | |
| end | |
| manager.resume |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment