Runs func while holding one permit from this.
The returned future resolves or rejects with the result of the spawned coroutine. The permit is released automatically after the coroutine resolves or rejects. If the returned future is discarded after the coroutine starts, the coroutine is allowed to complete so that the permit can be released.
| this |
a `DexLimiter` |
| scheduler |
scheduler to spawn |
| func |
coroutine function to run after a permit is acquired |
| user_data |
closure data for |
| user_data_destroy |
destroy notify for |
|
a future representing the spawned coroutine |