Click here to Skip to main content
15,892,517 members
Articles / Programming Languages / C++

Cross thread calls in native C++

Rate me:
Please Sign up or sign in to vote.
4.85/5 (38 votes)
19 Jul 2007Apache20 min read 118K   1.2K   96  
An article which discusses the need for synchronization in multi-threaded applications, and features a generic framework for making calls across threads: ThreadSynch.

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ThreadSynch", "ThreadSynch\ThreadSynch.vcproj", "{5C79F633-AA43-455B-94D4-95AFD74D2F38}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ThreadSynchDemo", "ThreadSynchTest\ThreadSynchTest.vcproj", "{4D70383D-A219-4851-838E-AB78CA5AE2FC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ThreadSynchDemoWM", "ThreadSynchTestWM\ThreadSynchTestWM.vcproj", "{45837AA9-DBA0-408C-AC52-FC8A2B613363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ThreadSynchTests", "UnitTests\UnitTests.vcproj", "{5EC140F4-A79B-4461-9178-A7A70A92FFD2}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{5C79F633-AA43-455B-94D4-95AFD74D2F38}.Debug|Win32.ActiveCfg = Debug|Win32
		{5C79F633-AA43-455B-94D4-95AFD74D2F38}.Debug|Win32.Build.0 = Debug|Win32
		{5C79F633-AA43-455B-94D4-95AFD74D2F38}.Release|Win32.ActiveCfg = Release|Win32
		{5C79F633-AA43-455B-94D4-95AFD74D2F38}.Release|Win32.Build.0 = Release|Win32
		{4D70383D-A219-4851-838E-AB78CA5AE2FC}.Debug|Win32.ActiveCfg = Debug|Win32
		{4D70383D-A219-4851-838E-AB78CA5AE2FC}.Debug|Win32.Build.0 = Debug|Win32
		{4D70383D-A219-4851-838E-AB78CA5AE2FC}.Release|Win32.ActiveCfg = Release|Win32
		{4D70383D-A219-4851-838E-AB78CA5AE2FC}.Release|Win32.Build.0 = Release|Win32
		{45837AA9-DBA0-408C-AC52-FC8A2B613363}.Debug|Win32.ActiveCfg = Debug|Win32
		{45837AA9-DBA0-408C-AC52-FC8A2B613363}.Debug|Win32.Build.0 = Debug|Win32
		{45837AA9-DBA0-408C-AC52-FC8A2B613363}.Release|Win32.ActiveCfg = Release|Win32
		{45837AA9-DBA0-408C-AC52-FC8A2B613363}.Release|Win32.Build.0 = Release|Win32
		{5EC140F4-A79B-4461-9178-A7A70A92FFD2}.Debug|Win32.ActiveCfg = Debug|Win32
		{5EC140F4-A79B-4461-9178-A7A70A92FFD2}.Debug|Win32.Build.0 = Debug|Win32
		{5EC140F4-A79B-4461-9178-A7A70A92FFD2}.Release|Win32.ActiveCfg = Release|Win32
		{5EC140F4-A79B-4461-9178-A7A70A92FFD2}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Software Developer
Norway Norway
My name is Einar Otto Stangvik, and I'm a programmer based in Oslo, Norway. I mainly develop applications and software architectures targetting C++ on the Windows platform, but I have also got experience doing the same on Unix and Linux. The last few years I've used C# a lot, but native C++ is still my main focus.


As of July 2008, I'm a Microsoft MVP for Visual C++.


Follow me on Twitter: @einaros
My code blog: einaros.blogspot.com
My site: www.indev.no

Comments and Discussions