Charm4Py uses Greenlets, lightweight thread-like objects to manage suspension of execution within a chare. Currently, futures in Charm4Py can only unsuspend correctly when future creation and waiting happens in the same coroutine. This means that in the master branch of Charm4Py this code snippet will hang when trying to retrieve the value from the futures:
Charm4Py uses Greenlets, lightweight thread-like objects to manage suspension of execution within a chare. Currently, futures in Charm4Py can only unsuspend correctly when future creation and waiting happens in the same coroutine. This means that in the master branch of Charm4Py this code snippet will hang when trying to retrieve the value from the futures:
This branches fixes this bug by allowing Futures to update their greenlet reference to the current execution context before yielding.