MATLAB Answers

Multithreading library in matlab

3 views (last 30 days)
Yessine KAMMOUN on 4 May 2021
Commented: Walter Roberson on 4 May 2021
My question is simple, is there a way to run threads in matlab like in cpp using <thread> or <pthread> standard library.
Thx in advance !

Answers (1)

Jan on 4 May 2021
No. You can use the command parfor and spmd, but this does not match the C++ threads exactly.
  1 Comment
Walter Roberson
Walter Roberson on 4 May 2021
Note: since R2020b it has been possible to configure parfor to use threads instead of separate processes. However, you cannot start new threads at will, and you cannot communicate between threads.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by