From ffa8942be1a534290f370705bf66020daa5d85ab Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 17 Feb 2005 22:22:54 +0000 Subject: [PATCH] test new exception mechanism in multithreaded environment git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6970 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../csharp/csharp_exceptions_runme.cs | 52 +++++++++++++++++++ Examples/test-suite/csharp_exceptions.i | 21 ++++++++ 2 files changed, 73 insertions(+) diff --git a/Examples/test-suite/csharp/csharp_exceptions_runme.cs b/Examples/test-suite/csharp/csharp_exceptions_runme.cs index 3c7c46bc6..1cd372f3e 100644 --- a/Examples/test-suite/csharp/csharp_exceptions_runme.cs +++ b/Examples/test-suite/csharp/csharp_exceptions_runme.cs @@ -1,4 +1,5 @@ using System; +using System.Threading; using csharp_exceptionsNamespace; public class runme @@ -183,8 +184,59 @@ public class runme } if (csharp_exceptions.exception_macro_run_flag) throw new Exception("exceptionmacrotest was executed"); + + // exceptions in multiple threads test + { + ThrowsClass throwsClass = new ThrowsClass(1234.5678); + const int NUM_THREADS = 8; + Thread[] threads = new Thread[NUM_THREADS]; + TestThread[] testThreads = new TestThread[NUM_THREADS]; + // invoke the threads + for (int i=0; i