The bag rocks.
@Simon Gao: if watching in Windows Media Player, you can slow down the playback using the built in enhancements.
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
As I see it, a counting semaphore is a form of throttle. This primitive is not related.
For me, the example code scenario is very familiar and this replaces the array of wait handles that I usually have to maintain when spinning up work items. I must admit to frowning at the 'hack' as it looked easy to forget, and like an after thought. There could be something like a FinishedAdding() method (just sets an initial handle) just to emphasise the requirement, or maybe not.
Great quality on the recording, on this laptop the fullscreen is like sitting at the machine it was recorded on. Although I'd love to be able to sign-in and comment without interrupting playback. Grrr...
Seva. You are correct, my apologies. Although the problem with using PF dev team stats is that while they may know that cranking up the other threads takes, say, 2,000 cycles per thread (I've really no idea - could be 20,000), you'd still have to test your task/code to see how much work it is in comparison.
Although if the profiler could try P.For and normal For and suggest when you're actually degrading performance, that'd be excellent. That said, I did think that P.For uses some kind of ramping up technology so it ran synchronously for small loads - and thus, what we saw in the video shouldn't happen. P.For is so easy to use but so easy to use in the wrong place.
My problem is that most of the code I write I think is too small to be parallelised. Like arrays of 12 items. By the time I've finished I've got a huge chain of little bits of work adding up to a large amount of work, so then I start to look for logic that can run independently of each other and kick off some branch of execution on another thread and re-join/wait further down. The problem being that in the future I won't be able to find enough simultaneous work to spread across all cores!
Daniel - thanks, that'd be cool.
As the narrator mentions, the Debug.Writeline causes the threads to queue/block on writing to the log/IDE. If this operation is significantly more costly than the work in the task (he has some simple math) then you're running essentially synchronously and the parallel code just becomes a burden.
Also, I always test by running the methods thousands or even millions of times and taking an average. OS noise amongst other things can severely impact a single pass of a method so you can sometimes get a misleading result.
Edit -- the tools far exceed all expectations. I'd like to see in-code-editor warnings about compiler optimisation and reordering pitfalls; for example, if I add an attribute [MultiThreaded] to a method, then (after compilation) the IDE highlights execution/reads/writes that has moved from the order it was coded.
Yup I'm with Odi; develop a couple of longer distance SideSight sensors under the front of the keyboard or something so the 'mouse' is no longer a feature. I'd be happy to drag my thumb around on the desk as the pointer - thinking about it, its not dissimilar to a large trackpad with Macbook style gestures.
It's true that we will be up for all kinds of RSI injuries if we have to hold our arms up touching an LCD screen all day.
"...well if you have to Tazer animals then we'd like it to be on a Microsoft stack." LMAO
Scott “Um.. Ah..” Guthrie wrote a mock-up of Visual Studio in a weekend! Never mind Lake Bill; the campus needs a Fountain Scott!
Firstly, I feel that variety is the spice of life and that while the office-based videos are cooler, I almost always want a better look at what's on the computer screens than can be achieved by waving a camera at it. So this format of video is good for that.
While I have you, some other suggestions and moans; please can you fix the site so I can login and comment without interrupting playback? And have you thought about a video queue and single player (with size options)? This would also prevent the volume resetting each time. And if you could make it always on top and 50% transparent so I can keep working. And a new car and a slice of cake.