Comments (3)
Hi @BenFrantzDale, there is no mention of FIFO guarantee into enqueue specification.
arena.max_concurrency()
was improved for a case tbb::task_arena{1,0}
(in #1128) but tbb::task_arena{1}
will still require additional slot for a worker thread because of enqueue
logic support thus arena.max_concurrency() == 2
.
from onetbb.
@pavelkumbrasev Thanks. From those docs I'm still not clear what reserved_for_masters
means and how max_concurrency
and reserved_for_masters
interact to produce the int max_concurrency() const
result.
I know there's no mention of a FIFO guarantee in enqueue
. I'm suggesting that I wished it would affirmatively state that there is no guarantee, especially with a name like "enqueue" versus, say, submit
or detach
which don't have the same potential FIFO impliciations. In contrast, it does say "Caution: There is no guarantee that tasks enqueued into an arena execute concurrently with respect to any other tasks there." which I read and think: Obviously, there may be only one worker available, and in general, execution order won't be guaranteed because one worker could pick up a task, then immediately go to sleep, then another could pick up the "next" one and do it to completion, giving the effect of the latter one executing first.
I'd be happy to PR documentation changes to clarify, but I'm not sure what the rules actually are.
And in general, if you know a way to set tbb::task_arena
or other things up to guarantee FIFO execution (never concurrent), I'm all ears.
from onetbb.
Hi @BenFrantzDale,
We add extra slot for worker thread in case of tbb::task_arena{1}
to support fire-and-forget
logic for enqueue
tasks. So such arena will have increased concurrency.
You can submit PR into oneTBB specification. There is a link to a PR as an example.
from onetbb.
Related Issues (20)
- What does `task_group_context` do? HOT 8
- Compile to WASM without threads? HOT 6
- The test_scheduler_mix hangs on !x86_64! HOT 17
- libtbb.so cannot be used with dlmopen() HOT 1
- When find() of tbb::concurrent_hash_map is used in parallel with iteration, the amount of data obtained is inconsistent with the size of the map? HOT 2
- tbb on wasm always executed on the main thread. HOT 29
- Possible data race reported by clang thread sanitizer HOT 6
- Disable TBBmalloc info message when compiling VS2022 HOT 2
- Is resumable task exception safe? HOT 4
- oneTBB 2021.11.0 APT package missing FindTBB.cmake HOT 6
- (Delete this issue) [Duplicate] Impossible to build the last version oneTBB 2021.11.0 on Windows with GCC 13.2
- Impossible to build the last version oneTBB 2021.11.0 on Windows with GCC 13.2 HOT 2
- Is there any reason we cannot implement a parallel_reduce for a rvalue range? HOT 2
- How to build TBB with static-libgcc and static-libstdc++ ? HOT 3
- Generating random numbers in parallel HOT 3
- oneTBB to schedule work execution on Intel GPUs HOT 1
- link fails building oneTBB from conan HOT 3
- Compiling errors while building with mingw gcc 13.2.0 HOT 1
- Update Node using TBB Nodes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onetbb.