Skip to content

Use an integer has an identifier for fiber instead of == #115

Open
@dinosaure

Description

Concerning some parts of Picos, it's required to know which is our current fiber to compare with some others (like for mutex and condition). It requires that Fiber must be used to be able to use Lazy, Mutex or Condition. However, only a comparison is needed. To give an opportunity for someone else to implement its own fiber but be able to use these modules, it can be interesting to define an effect such as type _ Effect.t += Current : int Effect.t which returns an unique identifier of the current fiber. By this way, the scheduler implementor just need to provide such unique identifier instead of a Fiber.t.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions