DOC: use continuatino prompt for proper example parsing.
`>>>` imply that a line is complete, proper continuation needs `...`.
@@ -324,18 +324,18 @@ class Semaphore:
Examples
--------
>>> from distributed import Semaphore
- >>> sem = Semaphore(max_leases=2, name='my_database')
- >>>
- >>> def access_resource(s, sem):
- >>> # This automatically acquires a lease from the semaphore (if available) which will be
- >>> # released when leaving the context manager.
- >>> with sem:
- >>> pass
- >>>
- >>> futures = client.map(access_resource, range(10), sem=sem)
- >>> client.gather(futures)
- >>> # Once done, close the semaphore to clean up the state on scheduler side.
- >>> sem.close()
+ ... sem = Semaphore(max_leases=2, name='my_database')
+ ...
+ ... def access_resource(s, sem):
+ ... # This automatically acquires a lease from the semaphore (if available) which will be
+ ... # released when leaving the context manager.
+ ... with sem:
+ ... pass
+ ...
+ ... futures = client.map(access_resource, range(10), sem=sem)
+ ... client.gather(futures)
+ ... # Once done, close the semaphore to clean up the state on scheduler side.
+ ... sem.close()
Notes
-----
