|
|
|
|
|
by cderwin
3513 days ago
|
|
Please correct me if I'm wrong, but doesn't asyncio in the form of async/await (or any other ways to explicitly denote context switches) solve the problem of data races in that per-thread data structures can be operated on atomically by different coroutines? My understanding is that unless data structures are shared with another thread, you don't usually need locks for shared data. |
|
Has any language tackled this with lazy locking? i.e. lock only on yield. Maybe this could even be done in compile time