mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.5K
active users

#threadpool

0 posts0 participants0 posts today
Felix Palmen :freebsd: :c64:<p>Oh boy, I have a lead! And it's NOT related to <a href="https://mastodon.bsd.cafe/tags/TLS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TLS</span></a>. I finally noticed another pattern: <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a> only <a href="https://mastodon.bsd.cafe/tags/crashed" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>crashed</span></a> when running as a <a href="https://mastodon.bsd.cafe/tags/daemon" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>daemon</span></a>. The daemonizing wasn't the problem, but the default logging configuration attached to it: "fake async", by letting a <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> job do the logging.</p><p>Forcing THAT even when running in foreground, I can finally reproduce a crash. And I wouldn't be surprised if that was actually the reason for crashing "pretty quickly" with <a href="https://mastodon.bsd.cafe/tags/LibreSSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LibreSSL</span></a> (and only rarely with <a href="https://mastodon.bsd.cafe/tags/OpenSSL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenSSL</span></a>), I mean, something going rogue in your address space can have the weirdest effects.</p>
Felix Palmen :freebsd: :c64:<p>Now that <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a> 0.7 is released, it's time to prepare a new release of <a href="https://mastodon.bsd.cafe/tags/poser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poser</span></a>, my own lib supporting <a href="https://mastodon.bsd.cafe/tags/services" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>services</span></a> on <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX</span></a> systems, following a <a href="https://mastodon.bsd.cafe/tags/reactor" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>reactor</span></a> with <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> design.</p><p>During development of swad, I moved poser from using strictly only POSIX APIs (with the scalability limits of e.g. <a href="https://mastodon.bsd.cafe/tags/select" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>select</span></a>) to auto-detected support for <a href="https://mastodon.bsd.cafe/tags/kqueue" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>kqueue</span></a>, <a href="https://mastodon.bsd.cafe/tags/epoll" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>epoll</span></a>, <a href="https://mastodon.bsd.cafe/tags/eventports" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>eventports</span></a>, <a href="https://mastodon.bsd.cafe/tags/signalfd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>signalfd</span></a> and <a href="https://mastodon.bsd.cafe/tags/timerfd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>timerfd</span></a> (so now it could, in theory(!), "compete" with e.g. libevent). I also fixed quite some hidden bugs, and added more base functionality, like a <a href="https://mastodon.bsd.cafe/tags/dictionary" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dictionary</span></a> using nested hashtables internally, or <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> tasks mimicking the async/await pattern known from e.g, <a href="https://mastodon.bsd.cafe/tags/csharp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>csharp</span></a>. I also deprecated two features, the periodic and global "service tick" (superseded by individual timers) and the "resolve hosts" property of a "connection" (superseded by a separate resolve class).</p><p>I'll have to decide on a few things, e.g. whether I'll remove the deprecated stuff immediately and bump the major version of the "posercore" lib. I guess I'll do just that. I'd also like to add all the web-specific stuff (http 1.0/1.1 server) that's currently part of the swad code as a "poserweb" lib. This would get a major version of 0, indicating a generally unstable API/ABI as of now....</p><p>And then, I'd have to decide where certain utility classes belong to. The rate limiter is probably useful for things other than web, so it should probably go to core. What about url encoding/decoding, for example? 🤔</p><p>Stay tuned, something will come here, maybe helping you to write a nice service in plain <a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a> 😎:</p><p><a href="https://github.com/Zirias/poser" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/Zirias/poser</span><span class="invisible"></span></a></p>
Felix Palmen :freebsd: :c64:<p>Revisiting <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> in <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX</span></a> C, trying to "add some <a href="https://mastodon.bsd.cafe/tags/security" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>security</span></a>" 🙈 </p><p>Recap: Consider a classic <a href="https://mastodon.bsd.cafe/tags/reactor" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>reactor</span></a>-style service in C with a <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> attached to run the individual request handlers. When such a handler needs to do some I/O, it'll have to wait for its completion, and doing so is kind of straight forward by just blocking the worker thread executing the job until whatever I/O was needed completes.</p><p>Now, blocking a thread is never a great thing to do and I recently tooted about an interesting alternative I found: Make use of the (unfortunately deprecated) POSIX user context switching to enable releasing the worker thread while waiting. In a nutshell, you create a context with <a href="https://mastodon.bsd.cafe/tags/makecontext" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>makecontext</span></a> that has its own private <a href="https://mastodon.bsd.cafe/tags/stack" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>stack</span></a>, and then you can use <a href="https://mastodon.bsd.cafe/tags/swapcontext" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swapcontext</span></a> to get off the thread, and later again to get back on the thread. A minor issue is: It must be the *same* thread ... so you might have to wait until it completes something else before you can resume your job. But then, that's probably okayish, you can make sure in your job scheduling to only use worker threads with awaited tasks attached when no other thread is available.</p><p>In my first implementation, I just used <a href="https://mastodon.bsd.cafe/tags/malloc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>malloc</span></a> to create a 64kiB private stack for each thread job. That's perfectly fine if you can guarantee your job will never consume more stack space, AND it won't have any vulnerabilities allowing some attacker to mess with the stack. But in practice, especially for a library offering this async/await implementation, it's nothing but a wild <a href="https://mastodon.bsd.cafe/tags/CVE" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CVE</span></a> generator.</p><p>So, I now improved on that:</p><p>* Allocate a much larger stack of now 2MiB. That alone makes issues at least less likely. And on a sane modern OS, we can still assume pages will only be mapped "on demand".<br>* Only allocate the stack directly before running the thread job, and delegate allocation to some internal "stack manager" that keeps track of all allocated stacks and reuses them, only freeing them on exit. This should avoid most of the allocation overhead.<br>* If MAP_ANON / MAP_ANONYMOUS is available, use <a href="https://mastodon.bsd.cafe/tags/mmap" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mmap</span></a> for allocating the stack. That at least gives a chance to stay away from other allocations ....<br>* But finally, if MAP_STACK is available, use this flag! From my research, <a href="https://mastodon.bsd.cafe/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/OpenBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenBSD</span></a> and <a href="https://mastodon.bsd.cafe/tags/NetBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NetBSD</span></a> will for example make sure there's at least one "guard page" below a stack mapped with this flag, so a stack overflow consistently takes the SIGSEGV emergency exit 😆. <a href="https://mastodon.bsd.cafe/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> knows this flag as well, but doesn't seem to implement such protection at this time ... 🤔 </p><p><a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a></p>
Felix Palmen :freebsd: :c64:<p>Nice, <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> overhaul done. Removed two locks (<a href="https://mastodon.bsd.cafe/tags/mutex" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mutex</span></a>) and two condition variables, replaced by a single lock and a single <a href="https://mastodon.bsd.cafe/tags/semaphore" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>semaphore</span></a>. 😎 Simplifies the overall structure a lot, and it's probably safe to assume slightly better performance in contended situations as well. And so far, <a href="https://mastodon.bsd.cafe/tags/valgrind" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>valgrind</span></a>'s helgrind tool doesn't find anything to complain about. 🙃</p><p>Looking at the screenshot, I should probably make <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a> default to *two* threads per CPU and expose the setting in the configuration file. When some thread jobs are expected to block, having more threads than CPUs is probably better.</p><p><a href="https://github.com/Zirias/poser/commit/995c27352615a65723fbd1833b2d36781cbeff4d" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Zirias/poser/commit</span><span class="invisible">/995c27352615a65723fbd1833b2d36781cbeff4d</span></a></p>
Felix Palmen :freebsd: :c64:<p>Still working on <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a>, and currently very busy with improving quality, most of the actual work done inside my <a href="https://mastodon.bsd.cafe/tags/poser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poser</span></a> library.</p><p>After finally supporting <a href="https://mastodon.bsd.cafe/tags/kqueue" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>kqueue</span></a> and <a href="https://mastodon.bsd.cafe/tags/epoll" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>epoll</span></a>, I now integrated <a href="https://mastodon.bsd.cafe/tags/xxhash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xxhash</span></a> to completely replace my previous stupid and naive hashing. I also added a more involved <a href="https://mastodon.bsd.cafe/tags/dictionary" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dictionary</span></a> class as an alternative to the already existing <a href="https://mastodon.bsd.cafe/tags/hashtable" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>hashtable</span></a>. While the hashtable's size must be pre-configured and collissions are only ever resolved by storing linked lists, the new dictionary dynamically nests multiple hashtables (using different bits of a single hash value). I hope to achieve acceptable scaling while maintaining also acceptable memory overhead that way ...</p><p><a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a> already uses both container classes as appropriate.</p><p>Next I'll probably revisit poser's <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a>. I think I could replace <a href="https://mastodon.bsd.cafe/tags/pthread" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pthread</span></a> condition variables by "simple" <a href="https://mastodon.bsd.cafe/tags/semaphores" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>semaphores</span></a>, which should also reduce overhead ... </p><p><a href="https://github.com/Zirias/swad" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/Zirias/swad</span><span class="invisible"></span></a></p><p><a href="https://mastodon.bsd.cafe/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a></p>
Felix Palmen :freebsd: :c64:<p>Fixed cancelling a thread job in <a href="https://mastodon.bsd.cafe/tags/poser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poser</span></a>'s <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a>. Using a semaphore to do this seems reliable 😎 </p><p>Oh my. <a href="https://mastodon.bsd.cafe/tags/Multithreading" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Multithreading</span></a>, <a href="https://mastodon.bsd.cafe/tags/synchronization" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>synchronization</span></a>, async <a href="https://mastodon.bsd.cafe/tags/Unix" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Unix</span></a> <a href="https://mastodon.bsd.cafe/tags/signals" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>signals</span></a>, this is pure "fun" ... 🙈 </p><p><a href="https://github.com/Zirias/poser/commit/aa4e02b728a549f0e3c4687750b90749d48fcfdc" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Zirias/poser/commit</span><span class="invisible">/aa4e02b728a549f0e3c4687750b90749d48fcfdc</span></a></p><p><a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a></p>
Habr<p>Task Parallel Library в C#</p><p>Привет, Хабр! Если ты всё ещё пишешь код на Thread или ThreadPool, пора остановиться и подумать. Зачем вручную управлять потоками, ловить дедлоки и страдать от гонок данных, если можно просто... не страдать? Сегодня разберём Task Parallel Library (TPL) в C# — единственно правильный способ писать многопоточный код в 2025 году.</p><p><a href="https://habr.com/ru/companies/otus/articles/886578/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/otus/art</span><span class="invisible">icles/886578/</span></a></p><p><a href="https://zhub.link/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a># <a href="https://zhub.link/tags/%D0%BC%D0%BD%D0%BE%D0%B3%D0%BE%D0%BF%D0%BE%D1%82%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>многопоточный_код</span></a> <a href="https://zhub.link/tags/TPL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TPL</span></a> <a href="https://zhub.link/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> <a href="https://zhub.link/tags/thread" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>thread</span></a></p>
JavaJobsHow to implement thread pool without ExecutorService I am trying to work on some understanding on...<br><br><a href="https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice" rel="nofollow noopener" target="_blank">https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/java" target="_blank">#java</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/multithreading" target="_blank">#multithreading</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a><br><br><a href="https://awakari.com/pub-msg.html?id=P04Xy4LwT6xAJrGVfODl3CRAg52" rel="nofollow noopener" target="_blank">Event Attributes</a>
JavaJobsHow to implement thread pool without ExecutorService I am trying to work on some understanding on...<br><br><a href="https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice" rel="nofollow noopener" target="_blank">https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/java" target="_blank">#java</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/multithreading" target="_blank">#multithreading</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a><br><br><a href="https://awakari.com/pub-msg.html?id=FSV6NnpP69tLW8YsU6GQ1VRzHhg" rel="nofollow noopener" target="_blank">Event Attributes</a>
JavaJobsHow to implement thread pool without ExecutorService I am trying to work on some understanding on...<br><br><a href="https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice" rel="nofollow noopener" target="_blank">https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/java" target="_blank">#java</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/multithreading" target="_blank">#multithreading</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a><br><br><a href="https://awakari.com/pub-msg.html?id=aCUu8oxbgfbugchvUDKAVf1OJW4" rel="nofollow noopener" target="_blank">Event Attributes</a>
JavaJobsHow to implement thread pool without ExecutorService I am trying to work on some understanding on...<br><br><a href="https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice" rel="nofollow noopener" target="_blank">https://stackoverflow.com/questions/79409584/how-to-implement-thread-pool-without-executorservice</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/java" target="_blank">#java</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/multithreading" target="_blank">#multithreading</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a><br><br><a href="https://awakari.com/pub-msg.html?id=SqQyyjCOhPLSCW2Ue6tNxHrHPiC" rel="nofollow noopener" target="_blank">Event Attributes</a>
Habr<p>Ловушка бесконечно ленивого бассейна</p><p>Нечасто встречаются истории, когда причины и следствия сплетаются в один клубок, связывающий проблемы и с памятью, и с CPU, и с тредпулом. А инструментально затрагивающие и пулы объектов, и Lazy, и работу с асинхронностью, и длительные вычисления. А ещё реже встречаются те, где всё это распутывается и исправляется буквально несколькими строчками кода.</p><p><a href="https://habr.com/ru/companies/skbkontur/articles/875514/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/skbkontu</span><span class="invisible">r/articles/875514/</span></a></p><p><a href="https://zhub.link/tags/net" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>net</span></a> <a href="https://zhub.link/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a># <a href="https://zhub.link/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> <a href="https://zhub.link/tags/c" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>c</span></a>#net <a href="https://zhub.link/tags/%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D1%81%D1%82%D1%8C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>производительность</span></a> <a href="https://zhub.link/tags/dotmemory" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dotmemory</span></a> <a href="https://zhub.link/tags/performance" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>performance</span></a></p>
FunctionalProgrammingHow to Create a Custom Thread and Retrieve Its Return Value in Python Title: How to Retrieve a Re...<br><br><a href="https://stackoverflow.com/questions/79378303/how-to-create-a-custom-thread-and-retrieve-its-return-value-in-python" rel="nofollow noopener" target="_blank">https://stackoverflow.com/questions/79378303/how-to-create-a-custom-thread-and-retrieve-its-return-value-in-python</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/multithreading" target="_blank">#multithreading</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a><br><br><a href="https://awakari.com/pub-msg.html?id=Wt4c5RIYRlkQYyTy5nxBiRIZgLQ" rel="nofollow noopener" target="_blank">Event Attributes</a>
Rust-JobHow can I use a thread pool to enable parallel processing in my Rust search application? I'm ...<br><br><a href="https://stackoverflow.com/questions/79033624/how-can-i-use-a-thread-pool-to-enable-parallel-processing-in-my-rust-search-appl" rel="nofollow noopener" target="_blank">https://stackoverflow.com/questions/79033624/how-can-i-use-a-thread-pool-to-enable-parallel-processing-in-my-rust-search-appl</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/rust" target="_blank">#rust</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/concurrency" target="_blank">#concurrency</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/parallel-processing" target="_blank">#parallel-processing</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a><br><br><a href="https://awakari.com/pub-msg.html?id=2mgnyLuempWha1yOJqsX518TpRZ" rel="nofollow noopener" target="_blank">Event Attributes</a>
linuxТредпульное заклятие Dotnet-демонов на Linux Все слышали о...<br><br><a href="https://habr.com/ru/companies/skbkontur/articles/844502/?utm_source=habrahabr&amp;utm_medium=rss&amp;utm_campaign=844502" rel="nofollow noopener" target="_blank">https://habr.com/ru/companies/skbkontur/articles/844502/?utm_source=habrahabr&amp;utm_medium=rss&amp;utm_campaign=844502</a><br><br><a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/dotnet" target="_blank">#dotnet</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/core" target="_blank">#core</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/threadpool" target="_blank">#threadpool</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/optimization" target="_blank">#optimization</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/linux" target="_blank">#linux</a> <a rel="nofollow noopener" class="mention hashtag" href="https://mastodon.social/tags/spinwait" target="_blank">#spinwait</a><br><br><a href="https://awakari.com/pub-msg.html?id=2mSeWzoEaAE8QNkVUQsjp2snmuE" rel="nofollow noopener" target="_blank">Event Attributes</a>
Habr<p>Тредпульное заклятие Dotnet-демонов на Linux</p><p>Все слышали о том, что иногда dotnet на Linux потребляет больше ресурсов, чем на Windows. Порой эта разница практически незаметна. Но случается и такое, что одно и то же приложение потребляет на Linux в 2-3 раза больше CPU, чем на Windows.</p><p><a href="https://habr.com/ru/companies/skbkontur/articles/844502/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">habr.com/ru/companies/skbkontu</span><span class="invisible">r/articles/844502/</span></a></p><p><a href="https://zhub.link/tags/dotnet_core" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dotnet_core</span></a> <a href="https://zhub.link/tags/threadpool" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>threadpool</span></a> <a href="https://zhub.link/tags/optimization" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>optimization</span></a> <a href="https://zhub.link/tags/linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>linux</span></a> <a href="https://zhub.link/tags/spinwait" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>spinwait</span></a></p>

ThreadPool – инъекция потоков

В этой статье мы начнем с небольшого погружения в код ThreadPool’a, а закончим интересным кейсом применения матанализа в одной из самых важных частей многопоточности в дотнете. С большой силой ThreadPool'а приходит большая ответственность! И поэтому наша ответственность – понимать устройство этого мощного иснтрумента, чтобы понимать его ограничения. А два главных способа понять: чтение кода и, конечно, эксперименты с многопоточностью...

habr.com/ru/companies/skbkontu

#c# #c#net #net #netcore #threadpool #async/await

ХабрThreadPool – инъекция потоковThreadPool в дотнете часто воспринимается нами как данность. Надежно укрытый от глаз за простым интерфейсом async-await, он выполняет трудную работу по обеспечению эффективной работы с потоками....

Настраиваем ExecutorService'ы под свои нужды

В этой статье хочу рассмотреть что такое ExecutorService в Java, зачем он нужен, варианты создания и в как его настраивать для решения практических задач Понимаю что есть много подобных статей, но в тех статьях что мне удалось найти не хватало практических примеров, сегодня хочу рассказать вам то, что по-настоящему пригодиться в работе Также я веду блог в телеграм , где вы сможете найти другие материалы от меня

habr.com/ru/articles/802113/

ХабрНастраиваем ExecutorService'ы под свои нуждыВ этой статье хочу рассмотреть что такое ExecutorService в Java, зачем он нужен, варианты создания и в как его настраивать для решения практических задач Понимаю что есть много подобных статей, но в...

Async/Await из C#. Головоломка для разработчиков компилятора и для нас

Я рискну все таки продолжить изложение своего понимания Поста: How Async/Await Really Works in C# , которое в предыдущей статье получило название “ортогональный взгляд”. Также, недавно мы познакомились (возможно несколько преждевременно) с изначальным определением концепции SynchronizationContext на которую ссылается автор этого Поста. Это не перевод. Это изложение содержания Поста на разных уровнях раскрытия сущностей и их взаимодействия по мере развития (эволюции) моего понимания тех мыслей и идей, которые, как мне кажется, хотел донести до читателя автор Поста Stephen Toub. То есть я пишу о том, что и как я понял из этого текста и стараюсь обосновать это свое понимание из найденного материала по теме, а вы одобряете или критикуете/уточняете то, что у меня получилось сформулировать. Таким образом мы самым естественным образом получим хорошую и полную интерпретацию содержания статьи на нашем родном языке, надеюсь, да еще и обогащенную критикой возможных заблуждений происходящих из недостаточности или неполноты изложения, например, по этой теме. В этот раз попробуем сформулировать задачу, которую решает компилятор, то есть те разработчики, которые разрешили нам пользоваться конструкциями Async/Await в C#.

habr.com/ru/articles/784630/

#async/await #асинхронное_программирование #паралельное_программирование #continuations #tasks #threadpool

ХабрAsync/Await из C#. Головоломка для разработчиков компилятора и для насЯ рискну все таки продолжить изложение своего понимания Поста: How Async/Await Really Works in C# , которое в предыдущей статье получило название “ортогональный взгляд”. Также, недавно мы...