ataranto/retlang — pull request #1 by GWBasic (2013-02-08 07:18:50+00:00)
Title: Added an ability to run code synchronously on a fiber. This is because s...

...ometimes you just have to wait for something on a fiber to finish.

This is one of the "missing features" that I found Retlang needs, and was one of the reasons why I created SharpLang

From experience with about 2 years of production use of Retang, I've found that my application has one fiber that manages global shared state.

In this case, there are scenarios where code running on another fiber has to block until the fiber that manages the shared state processes the change.

I avoid deadlocks by making sure that only one fiber has global shared state, and that code that uses the shared state doesn't block or run for very long.

It's an example of where a design pattern works 95% of the time, and the other 5% of the time you just need to revert to old-fashioned locking.

With this pull request, you can!