This book is aimed at those who are new to multithreaded programming, and who are looking for a quick and easy way to get started. It is assumed that you have some experience in C# and .NET already, and you should also be familiar with basic computer science terminology and basic algorithms and data structures.What You Will Learn Use C# 6.0 asynchronous language features Work with raw threads, synchronize threads, and coordinate their work Develop your own asynchronous API with Task Parallel Library Work effectively with a thread pool Scale up your server application with I/O threads Parallelize your LINQ queries with PLINQ Use common concurrent collections Apply different parallel programming patterns Use Reactive Extensions to run asynchronous operations and manage their options In Detail
Multi-core processors are synonymous with computing speed and power in today's world, which is why multithreading has become a key concern for C# developers. Multithreaded code helps you create effective, scalable, and responsive applications.
This is an easy-to-follow guide that will show you difficult programming problems in context. You will learn how to solve them with practical, hands-on, recipes. With these recipes, you'll be able to start creating your own scalable and reliable multithreaded applications. Starting from learning what a thread is, we guide you through the basics and then move on to more advanced concepts such as task parallel libraries, C# asynchronous functions, and much more.
Rewritten to the latest C# specification, C# 6, and updated with new and modern recipes to help you make the most of the hardware you have available, this book will help you push the boundaries of what you thought possible in C#.Style and approach
This is an easy-to-follow guide full of hands-on examples of real-world multithreading tasks. Each topic is explained and placed in context, and for the more inquisitive, there are also more in-depth details of the concepts used.
Concurrency is becoming more common in responsive and scalable application development, but it’s been extremely difficult to code. The detailed solutions in this cookbook show you how modern tools raise the level of abstraction, making concurrency much easier than before. Complete with ready-to-use code and discussions about how and why the solution works, you get recipes for using:async and await for asynchronous operationsParallel programming with the Task Parallel LibraryThe TPL Dataflow library for creating dataflow pipelinesCapabilities that Reactive Extensions build on top of LINQUnit testing with concurrent codeInterop scenarios for combining concurrent approachesImmutable, threadsafe, and producer/consumer collectionsCancellation support in your concurrent codeAsynchronous-friendly Object-Oriented ProgrammingThread synchronization for accessing data
If you are a C# developer who wants to develop modern applications in C# and wants to overcome problems by using asynchronous APIs and standard patterns, then this book is ideal for you. Reasonable development knowledge, an understanding of core elements and applications related to the .Net platform, and also the fundamentals of concurrency is assumed.What You Will LearnApply general multithreading concepts to your application's designLeverage lock-free concurrency and learn about its pros and cons to achieve efficient synchronization between user threadsCombine your asynchronous operations with Task Parallel LibraryMake your code easier with C#'s asynchrony supportUse common concurrent collections and programming patternsWrite scalable and robust server-side asynchronous codeCreate fast and responsible client applicationsAvoid common problems and troubleshoot your multi-threaded and asynchronous applicationsIn Detail
Starting with the traditional approach to concurrency, you will learn how to write multithreaded concurrent programs and compose ways that won't require locking. You will explore the concepts of parallelism granularity, and fine-grained and coarse-grained parallel tasks by choosing a concurrent program structure and parallelizing the workload optimally. You will also learn how to use task parallel library, cancellations, timeouts, and how to handle errors. You will know how to choose the appropriate data structure for a specific parallel algorithm to achieve scalability and performance. Further, you'll learn about server scalability, asynchronous I/O, and thread pools, and write responsive traditional Windows and Windows Store applications.
By the end of the book, you will be able to diagnose and resolve typical problems that could happen in multithreaded applications.Style and approach
An easy-to-follow, example-based guide that will walk you through the core principles of concurrency and multithreading using C#.
Within minutes, Jonathan Stride, Serena Dial, and Maggie Bei are at work with the FBI to find the terrorists behind the tragedy. As social media feeds a flood of rumors and misinformation, one spectator remembers being jostled by a young man with a backpack not far from the bomb site. He spots a Muslim man in a tourist's photo of the event and is convinced that this was the man who bumped into him in the crowd--but now the man's backpack is missing.
When he tweets the photo to the public, the young man, Khan Rashid, becomes the most wanted man in the city. And the manhunt is on.
But are the answers behind the Duluth bombing more complex than anyone realizes? And can Stride, Serena, and Maggie find the truth before more innocent people are killed?
Sixteen-year-old Catalina Mateo shows up unannounced one night in Detective Jonathan Stride's home, dripping wet from a desperate plunge into the icy waters of Lake Superior. Her sodden clothes stained with blood, Cat spins a tale of a narrow escape from a shadowy pursuer.
Stride decides to trust this girl, but his judgment may be clouded by memories of Cat's mother. Ten years earlier, Cat hid under the porch of her family home while her mother was brutally butchered by her ex-con father. Stride still blames himself for not preventing the slaughter.
But is Cat telling the truth? Stride's police partner, Maggie Bei, doubts the homeless girl, who has been living rough on the streets of Duluth since her mother's death--and now sleeps with a knife hidden under her pillow.
As Stride investigates Cat's story, more violence trails in the teenager's wake--and Maggie's suspicions about her deepen. Now a single question haunts the void between them: Should Stride be afraid for--or of--this terribly damaged girl?
In the quiet town of Grand Rapids, Minnesota, a baby vanishes from her bedroom in an opulent lakeside home. Was she abducted – or does her father have a terrible secret to hide?
That same night, a young policewoman gets lost in the fog and stumbles into the middle of a horrific crime. Now a sadistic killer wants her to play his deadly game.
Lieutenant Jonathan Stride and his team need to move fast to save a child and stop a vicious killing spree. As fear grips the frozen winter farm lands, Stride knows that every snow-covered field may be the next burying place.
Each twist in the investigation takes Stride into an elaborate web of deceit and desire. But his biggest obstacles may be the very people he's trying to help. With everything at risk and time running out, Stride worries how far a desperate mother will go to rescue her baby – and how far a desperate cop will go to save herself, in Brian Freeman's thrilling The Burying Place.
Lieutenant Jonathan Stride is suffering from an ugly case of déjà vu. For the second time in a year, a beautiful teenage girl has disappeared off the streets of Duluth, Minnesota—gone without a trace, like a bitter gust off Lake Superior. The two victims couldn't be more different. First it was Kerry McGrath, bubbly, sweet sixteen. And now Rachel Deese, strange, sexually charged, a wild child. The media hounds Stride to catch a serial killer, and as the search carries him from the icy stillness of the northern woods to the erotic heat of Las Vegas, he must decide which facts are real and which are illusions. And Stride finds his own life changed forever by the secrets he uncovers. Secrets that stretch across time in a web of lies, death, and illicit desire. Secrets that are chillingly...immoral.
They looked like isolated cases: a hit-and-run and a celebrity murdered during a fling with a prostitute. No one could ever imagine they'd be linked to a brutal crime in Las Vegas's steamy past—and that the race against the clock to corner a determined serial killer would stir up secrets long thought buried with the dead. As detectives Jonathan Stride and Serena Dial are called separately to investigate, they have no idea what they're stepping into: a world where desperate ambition rules and loyalties know no bounds, and where their own uncharted emotions and sexual desires will reach an explosive conclusion.
Shocking, twisted, with edge-of-your-seat suspense, Stripped pushes the limits of its heroes and keeps the reader turning ever page until the last plot twist.
Attractive and popular politician Diane Fairmont is running for the Florida governorship, but a chill is cast over the campaign when she receives an anonymous note announcing the return of the assassin who killed her husband ten years earlier. Because of complicated ties between Fairmont and his mother, movie actress Tarla Bolton, Detective Bolton is assigned to the case.
As Bolton struggles to penetrate the veil of secrecy surrounding the Fairmont campaign, he begins to realize that the death threat is not the only danger faced by the campaign staff. A desperate race against the clock ensues as Bolton tries to unlock the secrets of a poisonous conspiracy before nature provides the perfect cover for a long-dormant killer to strike again.
It's the case that has haunted Stride for thirty years. During the summer after his junior year of high school, he fell in love with beautiful Cindy Starr, the girl who would become his wife. But on the Fourth of July, the same night that Jonny and Cindy cemented their love, Cindy's older sister Laura was savagely murdered. The police suspected a vagrant of committing the crime, but no one was ever arrested, and the case was closed.
Now, Laura's best friend Tish Verdure has returned to Duluth to write a book about Laura's death. Tish knows secrets that a lot of people would like to keep hidden, including information about Cindy that leave Stride questioning his entire past. When a young girl is found drowned in the St. Louis River and a witness to the original murder attempts suicide, Stride realizes that the violence of the past is spilling over into the present.
As he unearths the explosive events that led to Laura's murder, Stride discovers that the ripples of her death changed everyone's lives, including his own. Can Stride put to rest the ghosts of his past, or will they devour him whole?
Hilary Bradley is determined to prove that Mark is innocent, but she's on a lonely, dangerous quest. Even when she discovers that the murdered girl was witness to a horrific crime years earlier, the police are certain she's throwing up a smoke screen to protect her husband. Only a quirky detective named Cab Bolton seems willing to believe Hilary's story.
Hilary and Cab soon find that people in this community are willing to kill to keep their secrets hidden—and to make sure Mark doesn't get away with murder. And with each shocking revelation, even Hilary begins to wonder whether her husband is truly innocent. Freeman's The Bone House, his first stand-alone thriller since his Stride novels, is a knockout.
At the time, Cindy and Stride were on opposite sides of a domestic murder investigation. Gorgeous, brilliant Janine Snow--a surgeon transplanted to Duluth from Texas--was the prime suspect in the shooting death of her husband. Cindy believed her friend Janine was innocent, but Stride thought all the evidence pointed to the surgeon--even though the gun was never found. Despite Cindy's attempts to help Janine, the case led to a high-profile murder trial in which Janine was convicted and sent to prison.
During the current investigation, Serena finds a gun used in the murder of a woman connected to an organized crime syndicate--a gun that turns out to be the same weapon used to kill Janine Snow's husband. Two unrelated cases years apart suddenly have a mysterious connection. As Stride investigates the possibility that human traffickers are targeting women in the Duluth port, he begins to question whether he made a terrible mistake eight years ago by putting an innocent woman in prison. And whether he will ever be able to make peace with the memory of his beloved wife and give his heart to Serena.