Module pr47::util::serializer[][src]

Expand description

serializer.rs: “User space”, runtime unaware coroutine serializer

This serializer could make sure only one of the participating tasks can can run at one time, no matter which runtime the user chose. However, tasks can still benefit from asynchronous completion of Futures.

The purpose of making this “coroutine serializer” is that Pr47 heavily relies on Run-Time Lifetime Checking (RTLC) and related analysis, which are hard to go multi-threading. Forcing everything to happen in a single-threaded, sequential, serialized behavior would solve this problem easily.

Structs

Context of one coroutine/task

Context shared by all coroutines in the same serialization group

Functions

Type Definitions

A Arc<Mutex> is basically a “serializer” context, serializing accesses to Data.

A MutexGuard guards unique access to Data. Logically, this structure serves as a “running permission” for coroutines/tasks.