Open eupp opened 10 months ago
@eupp, why would a data structure launch a coroutine?
why would a data structure launch a coroutine?
I mentioned that this is unlikely case:
Currently, the primary use case of Lincheck is to test concurrent data structures and synchronization primitives. This type of code rarely requires to create custom coroutines inside operations.
But I would rather prefer to keep this as a tracking issue, in case we discover such cases later (or users will report something related).
We might need to revisit this problem under #386
Currently, the Lincheck supports only top-level
suspend
functions declared as operations.That is, the following code is supported:
But the coroutines launched by the user code are not tracked and thus may work incorrectly. For example, the following code may not work as expected:
In order to support the latter case, the Lincheck need to be able to intercept coroutine's events (suspension, resumption, etc) in an arbitrary code.
Pros:
Cons: