Strona głównaUżytkownik

http://badamczewski.blogspot.com/ | użytkownik

http://badamczewski.blogspot.com/
http://badamczewski.blogspot.com/
339,45
4190 dni, 18 godzin, 11 minut temu
10 maja, 2012
dotnetomaniak.pl

If you have read about the new features in 4.0 then probably you stumbled on a SpinWait structure and a MSDN article and the example code it provides. I'm going to show you what I think it's wrong with it.

Dziel się z innymi:
[EN] Lock Free And SpinWait MSDN Example | Passion of Programming in .NET

Inne 4241 dni, 23 godziny, 8 minut temu http://badamczewski.blogspo... 32 źrodło rozwiń

Lock free data structures are very handy for concurrent programs especially that the number of cores increases. The benefits of such data structures is that they never acquire a lock, instead they do a form of a spin lock, where a local copy of the data must be stored and exchanged or updated by an processors atomic operation (like "compare and swap" or "fetch and add") only when the global value and the local copy match, otherwise we repeat the whole procedure. Almost every lock free data structure foll...

Tagi: C#
Dziel się z innymi:
[EN] Lock Free Work Stealing Queue | Passion of Programming in .NET

Inne 4263 dni, 3 godziny, 17 minut temu http://badamczewski.blogspo... 70 źrodło rozwiń

When working with applications that utilize lots of threads and those threads arent particularry long running we can stumble upon a problem that we may lose most of the processing time for thread context switches, so it would be desirable to do all of the processing on a limited number of threads, usualy this can be done using a queue of delegates that each thread will process, but sometimes we cannot have that and still w...

Dziel się z innymi:
[EN] Fibers (series, part 1) | Passion of Programming in .NET

Inne 4319 dni, 4 godziny, 10 minut temu http://badamczewski.blogspo... 157 źrodło rozwiń

When working with multi threaded applications, we tend to spawn worker threads which can lead to ineffective code when not done correctly, for example threads will not get reused and will be recreated for each work items. The solution to all those problems is a ThreadPool which reuses threads and queues work items that are consumed by those threads. This sort of implementation while simple can have side effects as unless the pool Queue is immutable it will have to be locked each time an item Enqueued and...

Dziel się z innymi:
Work Stealing | Passion of Programming in .NET

Inne 4360 dni, 2 godziny, 38 minut temu http://badamczewski.blogspo... 213 źrodło rozwiń

Najaktywniejsi w tym miesiącu