Strona głównaUżytkownik

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

http://badamczewski.blogspot.com/
http://badamczewski.blogspot.com/
339,45
4412 dni, 17 godzin, 25 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 4463 dni, 22 godziny, 22 minuty 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 4485 dni, 2 godziny, 31 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 4541 dni, 3 godziny, 24 minuty 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 4582 dni, 1 godzinę, 52 minuty temu http://badamczewski.blogspo... 213 źrodło rozwiń

Najaktywniejsi w tym miesiącu