Skip to content

OpenBLAS controlling thread logic needs to be smarter when thre are overlapping set/restore pairs in different threads #299

Open

Description

@itamarst

Based on joblib/joblib#1871 (comment)

Scenario:

  1. Initial limit is L.
  2. Thread 1 limits to M, stores the fact that previously limit was L. Thread 1 becomes controlling thread.
  3. Thread 2 tries to limit to N, but fails, stores the fact that previously limit was M.
  4. Thread 1 restores to L and releases control of thread.
  5. Thread 2 restores to N, acquiring control as it does so.

The straightforward solution here is something like "if a thread failed to set because it wasn't the controlling thread, it shouldn't restore either."

Activity

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

Metadata

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