Thursday, August 8, 2013
In the last few months, I’ve been working on a course for PluralSight. Creating a video course is not easy, as I found out first hand. In fact, it’s more difficult than writing a book. With a book, I can change a sentence or a paragraph, at any time and any place. A video course is different… changes are hard, and recording sessions cannot be done just anywhere. But I’ve learned a lot from the experience, which should make next courses a bit easier…My first course is about a favorite subject of mine, Windows Internals. This deals with the...
Monday, July 15, 2013
Next week, John Bryce Training, along with some of its partners, set up a two day conference named Extreme Dev Con 2013, on the 22nd and 23rd of July in Hertzliya (Israel). The conference consists mainly of full one-day seminars, several happening at the same time (naturally).I will be presenting a full day seminar, titled something like “.NET deep dive for performance”. The rough topics are listed in the above link, but basically I will cover various topics that somehow relate to that elusive thing called “performance”. From process and AppDomains, through the garbage collector and friends, threads and...
Tuesday, June 18, 2013
This evening I gave a talk on the Task Parallel Library (TPL) and the asynchronous programming features of C# 5.0 & .NET 4.5 at the Israeli Web developers user group. Thank you all for coming, I had a lot of fun!Although the TPL has been around in release for for more than 3 years, I’m still surprised to find developers who know little about and don’t use it. This is unfortunate, as I consider the TPL one of the best parts of .NET. I wish more developers learn it and use it. The same goes for C# 5.0. For...
Saturday, July 21, 2012
The single threaded behavior of WPF (and other UI technologies) requires that anything tied to the user interface be manipulated on the UI thread, incuding data bound objects. There are several ways to do that, assuming the code is on a non-UI thread, such as using Dispatcher.(Begin)Invoke, capturing and using the current SynchronizationContext, etc.Specifically, if some collection is data bound, items cannot be added or removed from it from a non-UI thread. WPF 4 (and earlier) throws an exception, because the data binding mechanism expects to be notified of changes (e.g. ObservableCollection<T>) on the UI thread.One of the improvements...
Tuesday, March 13, 2012
This month turned out to be a busy one for me, at least as far as public presentations are concerned. All sessions are free of charge, but you should register – details follow:
Parallel and Asynchronous Programming with .NET 4/4.5 and C# 5.0
This session is to be held on the 20th, at John Bryce offices in Tel Aviv. I will do a quick recap of tasks and the Parallel class, and then move to async programming with and without the new C# 5.0 features. I will be using VS 2010 and the recently released (beta) Visual Studio 11.
Link to registration
Thursday, August 11, 2011
After some time of inactivity, the WPDUG is back! Our next meeting will be held on September 7th, in Microsoft Offices in Ra’anana. The agenda and registration form is here. Please register so you’d have a parking space and enough food is presented… See you there!
Wednesday, February 24, 2010
Last night I delivered a session entitled “Writing Software Device Drivers on Windows” in the Windows Platform Developers user group. I gave a “crash course” of 1.5 hours on writing a driver that allows me to execute code within the kernel to do things that are not possible from user mode. Thank you all for coming and for the great feedback! I’ve attached the presentation and the demo code, including the driver code, the installer and the client application. Note that to compile successfully with Visual Studio, the make command line in Project->Properties must point to the...
Sunday, January 6, 2008
בעולם של ה-CLR לא קשה לבצע פעולות אסינכרוניות. למשל, כל delegate תומך אוטומטית בהפעלה אסינכרונית ע"י BeginInvoke ו-EndInvoke. מי שצריך לעבוד ללא
delegate יכול להשתמש ב-ThreadPool שלו מספר מתודות סטטיות להפעלת method בצורה אסינכרונית.
הבעיה ב-ThreadPool היא שהינו יחיד. כלומר, אם יש מצב שבו יש באפליקציה שתי סוגי
בקשות, אחת בעדיפות רגילה ואחת בעדיפות גבוהה, הן ייזרקו לאותו תור שמנהל את
הבקשות האסינכרוניות, ואם לדוגמא, יש 100 בקשות רגילות בתור ואז צריך להעביר בקשה
בעדיפות גבוהה, הבקשה תאלץ לחכות עד לטיפול של ה-100 הקודמות (כי ה-ThreadPool לא ייצר 100 Threads). מה עושים?
ב-Windows Vista קיים API חדש המאפשר לייצר Thread Pool פרטי (CreateThreadPool) ולעבוד איתו....