Bug 6644 - mono-sgen 2.11.3 on Windows : System.Threading.Timer not working
Summary: mono-sgen 2.11.3 on Windows : System.Threading.Timer not working
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-08-22 11:30 UTC by Horst Kakuschke
Modified: 2012-08-30 14:30 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Horst Kakuschke 2012-08-22 11:30:32 UTC
Mono Version 2.11.3 running on Windows7:
when using mono-sgen.exe the instantiation of a System.Threading.Timer results in an error "Windows systems haven't been ported to support mono_thread_state_init_from_handle".
When executing with mono.exe (with Boehm GC) this works fine.

mono-sgen of Version 2.11.2 was different: the instantiation and execution of Timers worked, but the same error was thrown after disposing the timer.

Using a System.Timers.Timer gives the same result (as it uses a System.Threading.Timer internally).

Example code:

using System;
namespace TmrSgen
	class Program
		static void Main(string[] args)
			using (System.Threading.Timer systemThreadingTimer = new System.Threading.Timer(SystemThreadingTimerCallback, null, 100, 100))

		static void SystemThreadingTimerCallback(object timerData)
Comment 1 Rodrigo Kumpera 2012-08-30 14:30:12 UTC
The windows port of sgen has not been completed. Keep using Boehm.