├── res ├── MainIcon.rc ├── otl.ico ├── MainIcon.res └── otl-logo.png ├── Clean.bat ├── doc ├── OtlComm.vsd ├── 41_Pipeline.vsd ├── 10_Containers.vsd ├── 8_RegisterComm.vsd ├── OtlDataManager.vsd ├── 9_Communication.vsd ├── queue with sentinel.xls ├── 48_PipelineExceptions.vsd └── OtlParallel execution model.vsd ├── OtlEventMonitor.dcr ├── unittests ├── GUIRunner.res ├── GUIRunner_Icon.ico ├── GUIRunner.dpr ├── TestValue.pas └── TestBlockingCollection1.pas ├── tests ├── 12_Lock │ ├── MainIcon.res │ ├── app_12_Lock.dpr │ └── test_12_Lock.dfm ├── 28_Hooks │ ├── MainIcon.res │ ├── app_28_Hooks.dpr │ └── test_28_Hooks.dfm ├── 32_Queue │ ├── MainIcon.res │ └── app_32_Queue.dpr ├── 46_Async │ ├── MainIcon.res │ ├── app_46_Async.XE4.res │ ├── app_46_Async.XE5.res │ ├── app_46_Async.dpr │ ├── test_46_Async.dfm │ └── test_46_Async.pas ├── 07_InitTest │ ├── MainIcon.res │ ├── app_7_InitTest.dpr │ └── test_7_InitTest.dfm ├── 16_ChainTo │ ├── MainIcon.res │ ├── app_16_ChainTo.dpr │ └── test_16_ChainTo.dfm ├── 17_MsgWait │ ├── MainIcon.res │ ├── app_17_MsgWait.dpr │ └── test_17_MsgWait.dfm ├── 34_TreeScan │ ├── MainIcon.res │ ├── app_34_TreeScan.XE4.res │ ├── app_34_TreeScan.XE5.res │ ├── app_34_TreeScan.dpr │ └── test_34_TreeScan.dfm ├── 39_Futures │ ├── MainIcon.res │ ├── app_39_Futures.XE4.res │ ├── app_39_Futures.XE5.res │ ├── app_39_Futures.dpr │ └── test_39_Futures.dfm ├── 41_Pipeline │ ├── MainIcon.res │ ├── app_41_Pipeline.XE4.res │ ├── app_41_Pipeline.XE5.res │ ├── app_41_Pipeline.dpr │ └── test_41_Pipeline.dfm ├── 01_HelloWorld │ ├── MainIcon.res │ ├── test_1_HelloWorld.dfm │ ├── app_1_HelloWorld.dpr │ └── test_1_HelloWorld.pas ├── 10_Containers │ ├── MainIcon.res │ ├── app_10_Containers.XE2.res │ └── app_10_Containers.dpr ├── 11_ThreadPool │ ├── MainIcon.res │ └── app_11_ThreadPool.dpr ├── 13_Exceptions │ ├── MainIcon.res │ ├── app_13_Exceptions.dpr │ └── test_13_Exceptions.dfm ├── 15_TaskGroup │ ├── MainIcon.res │ ├── app_15_TaskGroup.dpr │ └── test_15_TaskGroup.dfm ├── 20_QuickSort │ ├── MainIcon.res │ ├── app_20_QuickSort.XE3.res │ ├── app_20_QuickSort.XE4.res │ ├── app_20_QuickSort.XE5.res │ ├── app_20_QuickSort.dpr │ └── test_20_QuickSort.dfm ├── 38_OrderedFor │ ├── MainIcon.res │ ├── app_38_OrderedFor.XE4.res │ ├── app_38_OrderedFor.XE5.res │ └── app_38_OrderedFor.dpr ├── 40_Mandelbrot │ ├── MainIcon.res │ ├── app_40_Mandelbrot.XE4.res │ ├── app_40_Mandelbrot.XE5.res │ ├── app_40_Mandelbrot.dpr │ └── test_40_Mandelbrot.dfm ├── 47_TaskConfig │ ├── MainIcon.res │ ├── app_47_TaskConfig.XE2.skincfg │ ├── app_47_TaskConfig.XE4.res │ ├── app_47_TaskConfig.XE5.res │ ├── app_47_TaskConfig.dpr │ └── test_47_TaskConfig.dfm ├── 02_TwoWayHello │ ├── MainIcon.res │ ├── app_2_TwoWayHello.dpr │ └── test_2_TwoWayHello.dfm ├── 08_RegisterComm │ ├── MainIcon.res │ └── app_8_RegisterComm.dpr ├── 14_TerminateWhen │ ├── MainIcon.res │ ├── app_14_TerminateWhen.dpr │ └── test_14_TerminateWhen.dfm ├── 25_WaitableComm │ ├── MainIcon.res │ ├── app_25_WaitableComm.dpr │ └── test_25_WaitableComm.dfm ├── 27_RecursiveTree │ ├── MainIcon.res │ └── app_27_RecursiveTree.dpr ├── 35_ParallelFor │ ├── MainIcon.res │ ├── app_35_ParallelFor.XE4.res │ ├── app_35_ParallelFor.XE5.res │ └── app_35_ParallelFor.dpr ├── 37_ParallelJoin │ ├── MainIcon.res │ ├── app_37_ParallelJoin.XE4.res │ ├── app_37_ParallelJoin.XE5.res │ ├── app_37_ParallelJoin.dpr │ └── test_37_ParallelJoin.dfm ├── 42_MessageQueue │ ├── MainIcon.res │ ├── app_42_MessageQueue.XE4.res │ ├── app_42_MessageQueue.XE5.res │ └── app_42_MessageQueue.dpr ├── 45_Fork-Join max │ ├── MainIcon.res │ ├── app_45_ForkJoinMax.XE4.res │ ├── app_45_ForkJoinMax.XE5.res │ ├── app_45_ForkJoinMax.dpr │ └── test_45_ForkJoinMax.dfm ├── 49_FramedWorkers │ ├── MainIcon.res │ ├── app_49_FramedWorkers.XE4.res │ ├── app_49_FramedWorkers.XE5.res │ ├── test_49_Common.pas │ ├── test_49_FramedWorkers.dfm │ ├── app_49_FramedWorkers.dpr │ ├── test_49_FrameWithWorker.dfm │ ├── test_49_FrameWithWorker.pas │ └── test_49_Worker.pas ├── 09_Communications │ ├── MainIcon.res │ ├── app_9_Communications.dpr │ └── test_9_Communications.dfm ├── 22_TerminationTest │ ├── MainIcon.res │ ├── app_22_TerminationTest.dpr │ └── test_22_TerminationTest.dfm ├── 24_ConnectionPool │ ├── MainIcon.res │ ├── app_24_ConnectionPool.dpr │ └── test_24_ConnectionPool.dfm ├── 31_WaitableObjects │ ├── MainIcon.res │ ├── app_31_WaitableObjects.dpr │ └── test_31_WaitableObjects.dfm ├── 43_InvokeAnonymous │ ├── MainIcon.res │ ├── app_43_InvokeAnonymous.XE4.res │ ├── app_43_InvokeAnonymous.XE5.res │ ├── app_43_InvokeAnonymous.dpr │ └── test_43_InvokeAnonymous.dfm ├── 50_OmniValueArray │ ├── MainIcon.res │ ├── app_50_OmniValueArray.XE4.res │ ├── app_50_OmniValueArray.XE5.res │ ├── app_50_OmniValueArray.dpr │ └── test_50_OmniValueArray.dfm ├── 18_StringMsgDispatch │ ├── MainIcon.res │ └── app_18_StringMsgDispatch.dpr ├── 19_StringMsgBenchmark │ ├── MainIcon.res │ ├── app_19_StringMsgBenchmark.dpr │ └── test_19_StringMsgBenchmark.dfm ├── 21_Anonymous_methods │ ├── MainIcon.res │ ├── app_21_Anonymous_methods.dpr │ ├── test_21_Anonymous_methods.dfm │ └── test_21_Anonymous_methods.pas ├── 26_MultiEventMonitor │ ├── MainIcon.res │ └── app_26_MultiEventMonitor.dpr ├── 33_BlockingCollection │ ├── MainIcon.res │ └── app_33_BlockingCollection.dpr ├── 36_ParallelAggregate │ ├── MainIcon.res │ ├── app_36_ParallelAggregate.XE4.res │ ├── app_36_ParallelAggregate.XE5.res │ └── app_36_ParallelAggregate.dpr ├── 51_PipelineStressTest │ ├── MainIcon.res │ ├── app_51_PipelineStressTest.XE4.res │ ├── app_51_PipelineStressTest.XE5.res │ ├── app_51_PipelineStressTest.dpr │ └── test_51_PipelineStressTest.dfm ├── 52_BackgroundWorker │ ├── MainIcon.res │ ├── app_52_BackgroundWorker.XE4.res │ ├── app_52_BackgroundWorker.XE5.res │ ├── app_52_BackgroundWorker.dpr │ └── test_52_BackgroundWorker.dfm ├── 23_BackgroundFileSearch │ ├── MainIcon.res │ └── app_23_BackgroundFileSearch.dpr ├── 29_ImplicitEventMonitor │ ├── MainIcon.res │ ├── app_29_ImplicitEventMonitor.dpr │ ├── test_29_TwoWayHello.dfm │ └── test_29_ImplicitEventMonitor.dfm ├── 44_Fork-Join QuickSort │ ├── MainIcon.res │ ├── app_44_ForkJoinQuickSort.XE3.res │ ├── app_44_ForkJoinQuickSort.XE4.res │ ├── app_44_ForkJoinQuickSort.XE5.res │ ├── app_44_ForkJoinQuickSort.dpr │ └── test_44_ForkJoinQuickSort.dfm ├── 54_LockManager │ ├── app_54_LockManager.skincfg │ ├── app_54_LockManager.res │ ├── app_54_LockManager.XE2.res │ ├── app_54_LockManager.XE3.res │ ├── app_54_LockManager.XE4.res │ ├── app_54_LockManager.XE5.res │ └── app_54_LockManager.dpr ├── 03_HelloWorld_with_package │ ├── MainIcon.res │ ├── app_3_HelloWorld_with_package.dpr │ ├── test_3_HelloWorld_with_package.dfm │ └── test_3_HelloWorld_with_package.pas ├── 30_AnonymousEventMonitor │ ├── MainIcon.res │ ├── app_30_AnonymousEventMonitor.dpr │ ├── test_30_AnonymousEventMonitor.dfm │ └── test_30_AnonymousEventMonitor.pas ├── 48_OtlParallelExceptions │ ├── MainIcon.res │ ├── app_48_OtlParallelExceptions.XE4.res │ ├── app_48_OtlParallelExceptions.XE5.res │ └── app_48_OtlParallelExceptions.dpr ├── 53_AsyncAwait │ ├── app_53_AsyncAwait.XE4.res │ ├── app_53_AsyncAwait.XE5.res │ ├── app_53_AsyncAwait.dpr │ ├── test_53_AsyncAwait.dfm │ ├── app_53_AsyncAwait.skincfg │ └── test_53_AsyncAwait.pas ├── 04_TwoWayHello_with_package │ ├── MainIcon.res │ ├── app_4_TwoWayHello_with_package.dpr │ └── test_4_TwoWayHello_with_package.dfm ├── 05_TwoWayHello_without_loop │ ├── MainIcon.res │ ├── app_5_TwoWayHello_without_loop.dpr │ └── test_5_TwoWayHello_without_loop.dfm ├── 06_TwoWayHello_with_object_worker │ ├── MainIcon.res │ ├── app_6_TwoWayHello_with_object_worker.dpr │ └── test_6_TwoWayHello_with_object_worker.dfm ├── 41_Cascade │ ├── app_41_Pipeline.dpr │ └── test_41_Pipeline.dfm └── 00_Beep │ ├── test_0_Beep.dfm │ ├── app_0_Beep.dpr │ └── test_0_Beep.pas ├── examples ├── checkVat │ ├── checkVat.res │ ├── checkVatService.pas │ ├── checkVat.dpr │ ├── checkVat.skincfg │ ├── checkVat1.dfm │ └── checkVat1.pas ├── twofish │ ├── TwoFish.res │ ├── TwoFish.dpr │ ├── twofish1.dfm │ └── twoFishDB.pas ├── forEach output │ ├── ForEachOutput.res │ ├── ForEachOutput.dpr │ ├── ForEachOutput1.dfm │ ├── ForEachOutput.skincfg │ └── ForEachOutput1.pas ├── report generator │ ├── simulation.xlsx │ ├── ReportGenerator.res │ ├── ReportGenerator.dpr │ ├── ReportGenerator.skincfg │ └── reportGenerator1.dfm └── stringlist parser │ ├── StringListParser.res │ ├── StringListParser.XE2.res │ ├── StringListParser.XE2_Icon.ico │ ├── StringListParser.dpr │ └── StringListParser1.dfm ├── packages ├── OmniThreadLibraryRuntime.res ├── OmniThreadLibraryDesigntime.res ├── OmniThreadLibraryRuntimeXE.res ├── OmniThreadLibraryRuntimeXE2.res ├── OmniThreadLibraryRuntimeXE3.res ├── OmniThreadLibraryRuntimeXE4.res ├── OmniThreadLibraryRuntimeXE5.res ├── OmniThreadLibraryDesigntimeXE.res ├── OmniThreadLibraryRuntime2009.res ├── OmniThreadLibraryRuntime2010.res ├── OmniThreadLibraryDesigntime2009.res ├── OmniThreadLibraryDesigntime2010.res ├── OmniThreadLibraryDesigntimeXE2.res ├── OmniThreadLibraryDesigntimeXE3.res ├── OmniThreadLibraryDesigntimeXE4.res ├── OmniThreadLibraryDesigntimeXE5.res ├── OmniThreadLibraryDesigntime.dpk ├── OmniThreadLibraryDesigntimeXE.dpk ├── OmniThreadLibraryDesigntime2009.dpk ├── OmniThreadLibraryDesigntime2010.dpk ├── OmniThreadLibraryDesigntimeXE2.dpk ├── OmniThreadLibraryDesigntimeXE3.dpk ├── OmniThreadLibraryDesigntimeXE4.dpk ├── OmniThreadLibraryDesigntimeXE5.dpk ├── OmniThreadLibraryRuntime2009.dpk ├── OmniThreadLibraryRuntime2010.dpk ├── OmniThreadLibraryRuntimeXE.dpk ├── OmniThreadLibraryRuntime.dpk ├── OmniThreadLibraryRuntimeXE2.dpk ├── OmniThreadLibraryRuntimeXE3.dpk ├── OmniThreadLibraryRuntimeXE4.dpk ├── OmniThreadLibraryRuntimeXE5.dpk ├── OmniThreadLibraryPackages.groupproj ├── OmniThreadLibraryPackagesXE.groupproj ├── OmniThreadLibraryPackagesXE2.groupproj ├── OmniThreadLibraryPackages2009.groupproj ├── OmniThreadLibraryPackages2010.groupproj └── OmniThreadLibraryPackagesXE3.groupproj ├── makedownload.bat └── bag of stuff ├── release-1.0.txt ├── release-1.04b.txt ├── release-1.04a.txt └── release-1.05a.txt /res/MainIcon.rc: -------------------------------------------------------------------------------- 1 | MainIcon ICON "otl.ico" 2 | 3 | -------------------------------------------------------------------------------- /Clean.bat: -------------------------------------------------------------------------------- 1 | del /s .\*.map;.\*.rsm;.\*.exe;.\*.dcu;.\*.drc 2 | pause -------------------------------------------------------------------------------- /res/otl.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/res/otl.ico -------------------------------------------------------------------------------- /doc/OtlComm.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/OtlComm.vsd -------------------------------------------------------------------------------- /res/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/res/MainIcon.res -------------------------------------------------------------------------------- /res/otl-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/res/otl-logo.png -------------------------------------------------------------------------------- /OtlEventMonitor.dcr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/OtlEventMonitor.dcr -------------------------------------------------------------------------------- /doc/41_Pipeline.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/41_Pipeline.vsd -------------------------------------------------------------------------------- /doc/10_Containers.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/10_Containers.vsd -------------------------------------------------------------------------------- /doc/8_RegisterComm.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/8_RegisterComm.vsd -------------------------------------------------------------------------------- /doc/OtlDataManager.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/OtlDataManager.vsd -------------------------------------------------------------------------------- /doc/9_Communication.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/9_Communication.vsd -------------------------------------------------------------------------------- /unittests/GUIRunner.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/unittests/GUIRunner.res -------------------------------------------------------------------------------- /doc/queue with sentinel.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/queue with sentinel.xls -------------------------------------------------------------------------------- /tests/12_Lock/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/12_Lock/MainIcon.res -------------------------------------------------------------------------------- /tests/28_Hooks/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/28_Hooks/MainIcon.res -------------------------------------------------------------------------------- /tests/32_Queue/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/32_Queue/MainIcon.res -------------------------------------------------------------------------------- /tests/46_Async/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/46_Async/MainIcon.res -------------------------------------------------------------------------------- /doc/48_PipelineExceptions.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/48_PipelineExceptions.vsd -------------------------------------------------------------------------------- /examples/checkVat/checkVat.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/checkVat/checkVat.res -------------------------------------------------------------------------------- /examples/twofish/TwoFish.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/twofish/TwoFish.res -------------------------------------------------------------------------------- /tests/07_InitTest/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/07_InitTest/MainIcon.res -------------------------------------------------------------------------------- /tests/16_ChainTo/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/16_ChainTo/MainIcon.res -------------------------------------------------------------------------------- /tests/17_MsgWait/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/17_MsgWait/MainIcon.res -------------------------------------------------------------------------------- /tests/34_TreeScan/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/34_TreeScan/MainIcon.res -------------------------------------------------------------------------------- /tests/39_Futures/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/39_Futures/MainIcon.res -------------------------------------------------------------------------------- /tests/41_Pipeline/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/41_Pipeline/MainIcon.res -------------------------------------------------------------------------------- /unittests/GUIRunner_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/unittests/GUIRunner_Icon.ico -------------------------------------------------------------------------------- /tests/01_HelloWorld/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/01_HelloWorld/MainIcon.res -------------------------------------------------------------------------------- /tests/10_Containers/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/10_Containers/MainIcon.res -------------------------------------------------------------------------------- /tests/11_ThreadPool/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/11_ThreadPool/MainIcon.res -------------------------------------------------------------------------------- /tests/13_Exceptions/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/13_Exceptions/MainIcon.res -------------------------------------------------------------------------------- /tests/15_TaskGroup/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/15_TaskGroup/MainIcon.res -------------------------------------------------------------------------------- /tests/20_QuickSort/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/20_QuickSort/MainIcon.res -------------------------------------------------------------------------------- /tests/38_OrderedFor/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/38_OrderedFor/MainIcon.res -------------------------------------------------------------------------------- /tests/40_Mandelbrot/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/40_Mandelbrot/MainIcon.res -------------------------------------------------------------------------------- /tests/47_TaskConfig/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/47_TaskConfig/MainIcon.res -------------------------------------------------------------------------------- /doc/OtlParallel execution model.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/doc/OtlParallel execution model.vsd -------------------------------------------------------------------------------- /tests/02_TwoWayHello/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/02_TwoWayHello/MainIcon.res -------------------------------------------------------------------------------- /tests/08_RegisterComm/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/08_RegisterComm/MainIcon.res -------------------------------------------------------------------------------- /tests/14_TerminateWhen/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/14_TerminateWhen/MainIcon.res -------------------------------------------------------------------------------- /tests/25_WaitableComm/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/25_WaitableComm/MainIcon.res -------------------------------------------------------------------------------- /tests/27_RecursiveTree/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/27_RecursiveTree/MainIcon.res -------------------------------------------------------------------------------- /tests/35_ParallelFor/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/35_ParallelFor/MainIcon.res -------------------------------------------------------------------------------- /tests/37_ParallelJoin/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/37_ParallelJoin/MainIcon.res -------------------------------------------------------------------------------- /tests/42_MessageQueue/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/42_MessageQueue/MainIcon.res -------------------------------------------------------------------------------- /tests/45_Fork-Join max/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/45_Fork-Join max/MainIcon.res -------------------------------------------------------------------------------- /tests/46_Async/app_46_Async.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/46_Async/app_46_Async.XE4.res -------------------------------------------------------------------------------- /tests/46_Async/app_46_Async.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/46_Async/app_46_Async.XE5.res -------------------------------------------------------------------------------- /tests/49_FramedWorkers/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/49_FramedWorkers/MainIcon.res -------------------------------------------------------------------------------- /examples/checkVat/checkVatService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/checkVat/checkVatService.pas -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntime.res -------------------------------------------------------------------------------- /tests/09_Communications/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/09_Communications/MainIcon.res -------------------------------------------------------------------------------- /tests/22_TerminationTest/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/22_TerminationTest/MainIcon.res -------------------------------------------------------------------------------- /tests/24_ConnectionPool/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/24_ConnectionPool/MainIcon.res -------------------------------------------------------------------------------- /tests/31_WaitableObjects/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/31_WaitableObjects/MainIcon.res -------------------------------------------------------------------------------- /tests/43_InvokeAnonymous/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/43_InvokeAnonymous/MainIcon.res -------------------------------------------------------------------------------- /tests/50_OmniValueArray/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/50_OmniValueArray/MainIcon.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntime.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntimeXE.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntimeXE2.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE3.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntimeXE3.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntimeXE4.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntimeXE5.res -------------------------------------------------------------------------------- /tests/18_StringMsgDispatch/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/18_StringMsgDispatch/MainIcon.res -------------------------------------------------------------------------------- /tests/19_StringMsgBenchmark/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/19_StringMsgBenchmark/MainIcon.res -------------------------------------------------------------------------------- /tests/21_Anonymous_methods/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/21_Anonymous_methods/MainIcon.res -------------------------------------------------------------------------------- /tests/26_MultiEventMonitor/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/26_MultiEventMonitor/MainIcon.res -------------------------------------------------------------------------------- /tests/33_BlockingCollection/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/33_BlockingCollection/MainIcon.res -------------------------------------------------------------------------------- /tests/36_ParallelAggregate/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/36_ParallelAggregate/MainIcon.res -------------------------------------------------------------------------------- /tests/39_Futures/app_39_Futures.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/39_Futures/app_39_Futures.XE4.res -------------------------------------------------------------------------------- /tests/39_Futures/app_39_Futures.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/39_Futures/app_39_Futures.XE5.res -------------------------------------------------------------------------------- /tests/51_PipelineStressTest/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/51_PipelineStressTest/MainIcon.res -------------------------------------------------------------------------------- /tests/52_BackgroundWorker/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/52_BackgroundWorker/MainIcon.res -------------------------------------------------------------------------------- /examples/forEach output/ForEachOutput.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/forEach output/ForEachOutput.res -------------------------------------------------------------------------------- /examples/report generator/simulation.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/report generator/simulation.xlsx -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntimeXE.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntime2009.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntime2009.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntime2010.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryRuntime2010.res -------------------------------------------------------------------------------- /tests/23_BackgroundFileSearch/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/23_BackgroundFileSearch/MainIcon.res -------------------------------------------------------------------------------- /tests/29_ImplicitEventMonitor/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/29_ImplicitEventMonitor/MainIcon.res -------------------------------------------------------------------------------- /tests/34_TreeScan/app_34_TreeScan.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/34_TreeScan/app_34_TreeScan.XE4.res -------------------------------------------------------------------------------- /tests/34_TreeScan/app_34_TreeScan.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/34_TreeScan/app_34_TreeScan.XE5.res -------------------------------------------------------------------------------- /tests/41_Pipeline/app_41_Pipeline.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/41_Pipeline/app_41_Pipeline.XE4.res -------------------------------------------------------------------------------- /tests/41_Pipeline/app_41_Pipeline.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/41_Pipeline/app_41_Pipeline.XE5.res -------------------------------------------------------------------------------- /tests/44_Fork-Join QuickSort/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/44_Fork-Join QuickSort/MainIcon.res -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.skincfg: -------------------------------------------------------------------------------- 1 | [ExpressSkins] 2 | Default=1 3 | ShowNotifications=1 4 | Enabled=1 5 | dxSkinsDefaultPainters=1 6 | -------------------------------------------------------------------------------- /examples/report generator/ReportGenerator.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/report generator/ReportGenerator.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntime2009.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntime2009.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntime2010.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntime2010.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntimeXE2.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE3.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntimeXE3.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntimeXE4.res -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/packages/OmniThreadLibraryDesigntimeXE5.res -------------------------------------------------------------------------------- /tests/03_HelloWorld_with_package/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/03_HelloWorld_with_package/MainIcon.res -------------------------------------------------------------------------------- /tests/10_Containers/app_10_Containers.XE2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/10_Containers/app_10_Containers.XE2.res -------------------------------------------------------------------------------- /tests/20_QuickSort/app_20_QuickSort.XE3.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/20_QuickSort/app_20_QuickSort.XE3.res -------------------------------------------------------------------------------- /tests/20_QuickSort/app_20_QuickSort.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/20_QuickSort/app_20_QuickSort.XE4.res -------------------------------------------------------------------------------- /tests/20_QuickSort/app_20_QuickSort.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/20_QuickSort/app_20_QuickSort.XE5.res -------------------------------------------------------------------------------- /tests/30_AnonymousEventMonitor/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/30_AnonymousEventMonitor/MainIcon.res -------------------------------------------------------------------------------- /tests/38_OrderedFor/app_38_OrderedFor.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/38_OrderedFor/app_38_OrderedFor.XE4.res -------------------------------------------------------------------------------- /tests/38_OrderedFor/app_38_OrderedFor.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/38_OrderedFor/app_38_OrderedFor.XE5.res -------------------------------------------------------------------------------- /tests/40_Mandelbrot/app_40_Mandelbrot.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/40_Mandelbrot/app_40_Mandelbrot.XE4.res -------------------------------------------------------------------------------- /tests/40_Mandelbrot/app_40_Mandelbrot.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/40_Mandelbrot/app_40_Mandelbrot.XE5.res -------------------------------------------------------------------------------- /tests/47_TaskConfig/app_47_TaskConfig.XE2.skincfg: -------------------------------------------------------------------------------- 1 | [ExpressSkins] 2 | Default=1 3 | ShowNotifications=1 4 | Enabled=1 5 | dxSkinsDefaultPainters=1 6 | -------------------------------------------------------------------------------- /tests/47_TaskConfig/app_47_TaskConfig.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/47_TaskConfig/app_47_TaskConfig.XE4.res -------------------------------------------------------------------------------- /tests/47_TaskConfig/app_47_TaskConfig.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/47_TaskConfig/app_47_TaskConfig.XE5.res -------------------------------------------------------------------------------- /tests/48_OtlParallelExceptions/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/48_OtlParallelExceptions/MainIcon.res -------------------------------------------------------------------------------- /tests/53_AsyncAwait/app_53_AsyncAwait.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/53_AsyncAwait/app_53_AsyncAwait.XE4.res -------------------------------------------------------------------------------- /tests/53_AsyncAwait/app_53_AsyncAwait.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/53_AsyncAwait/app_53_AsyncAwait.XE5.res -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/54_LockManager/app_54_LockManager.res -------------------------------------------------------------------------------- /examples/stringlist parser/StringListParser.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/stringlist parser/StringListParser.res -------------------------------------------------------------------------------- /tests/04_TwoWayHello_with_package/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/04_TwoWayHello_with_package/MainIcon.res -------------------------------------------------------------------------------- /tests/05_TwoWayHello_without_loop/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/05_TwoWayHello_without_loop/MainIcon.res -------------------------------------------------------------------------------- /tests/35_ParallelFor/app_35_ParallelFor.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/35_ParallelFor/app_35_ParallelFor.XE4.res -------------------------------------------------------------------------------- /tests/35_ParallelFor/app_35_ParallelFor.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/35_ParallelFor/app_35_ParallelFor.XE5.res -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.XE2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/54_LockManager/app_54_LockManager.XE2.res -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.XE3.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/54_LockManager/app_54_LockManager.XE3.res -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/54_LockManager/app_54_LockManager.XE4.res -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/54_LockManager/app_54_LockManager.XE5.res -------------------------------------------------------------------------------- /tests/37_ParallelJoin/app_37_ParallelJoin.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/37_ParallelJoin/app_37_ParallelJoin.XE4.res -------------------------------------------------------------------------------- /tests/37_ParallelJoin/app_37_ParallelJoin.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/37_ParallelJoin/app_37_ParallelJoin.XE5.res -------------------------------------------------------------------------------- /tests/42_MessageQueue/app_42_MessageQueue.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/42_MessageQueue/app_42_MessageQueue.XE4.res -------------------------------------------------------------------------------- /tests/42_MessageQueue/app_42_MessageQueue.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/42_MessageQueue/app_42_MessageQueue.XE5.res -------------------------------------------------------------------------------- /tests/45_Fork-Join max/app_45_ForkJoinMax.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/45_Fork-Join max/app_45_ForkJoinMax.XE4.res -------------------------------------------------------------------------------- /tests/45_Fork-Join max/app_45_ForkJoinMax.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/45_Fork-Join max/app_45_ForkJoinMax.XE5.res -------------------------------------------------------------------------------- /examples/stringlist parser/StringListParser.XE2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/stringlist parser/StringListParser.XE2.res -------------------------------------------------------------------------------- /tests/06_TwoWayHello_with_object_worker/MainIcon.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/06_TwoWayHello_with_object_worker/MainIcon.res -------------------------------------------------------------------------------- /tests/49_FramedWorkers/app_49_FramedWorkers.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/49_FramedWorkers/app_49_FramedWorkers.XE4.res -------------------------------------------------------------------------------- /tests/49_FramedWorkers/app_49_FramedWorkers.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/49_FramedWorkers/app_49_FramedWorkers.XE5.res -------------------------------------------------------------------------------- /tests/43_InvokeAnonymous/app_43_InvokeAnonymous.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/43_InvokeAnonymous/app_43_InvokeAnonymous.XE4.res -------------------------------------------------------------------------------- /tests/43_InvokeAnonymous/app_43_InvokeAnonymous.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/43_InvokeAnonymous/app_43_InvokeAnonymous.XE5.res -------------------------------------------------------------------------------- /tests/50_OmniValueArray/app_50_OmniValueArray.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/50_OmniValueArray/app_50_OmniValueArray.XE4.res -------------------------------------------------------------------------------- /tests/50_OmniValueArray/app_50_OmniValueArray.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/50_OmniValueArray/app_50_OmniValueArray.XE5.res -------------------------------------------------------------------------------- /examples/stringlist parser/StringListParser.XE2_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/examples/stringlist parser/StringListParser.XE2_Icon.ico -------------------------------------------------------------------------------- /tests/52_BackgroundWorker/app_52_BackgroundWorker.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/52_BackgroundWorker/app_52_BackgroundWorker.XE4.res -------------------------------------------------------------------------------- /tests/52_BackgroundWorker/app_52_BackgroundWorker.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/52_BackgroundWorker/app_52_BackgroundWorker.XE5.res -------------------------------------------------------------------------------- /tests/36_ParallelAggregate/app_36_ParallelAggregate.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/36_ParallelAggregate/app_36_ParallelAggregate.XE4.res -------------------------------------------------------------------------------- /tests/36_ParallelAggregate/app_36_ParallelAggregate.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/36_ParallelAggregate/app_36_ParallelAggregate.XE5.res -------------------------------------------------------------------------------- /tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.XE3.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.XE3.res -------------------------------------------------------------------------------- /tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.XE4.res -------------------------------------------------------------------------------- /tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.XE5.res -------------------------------------------------------------------------------- /tests/51_PipelineStressTest/app_51_PipelineStressTest.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/51_PipelineStressTest/app_51_PipelineStressTest.XE4.res -------------------------------------------------------------------------------- /tests/51_PipelineStressTest/app_51_PipelineStressTest.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/51_PipelineStressTest/app_51_PipelineStressTest.XE5.res -------------------------------------------------------------------------------- /tests/48_OtlParallelExceptions/app_48_OtlParallelExceptions.XE4.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/48_OtlParallelExceptions/app_48_OtlParallelExceptions.XE4.res -------------------------------------------------------------------------------- /tests/48_OtlParallelExceptions/app_48_OtlParallelExceptions.XE5.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ghquant/Delphi-OmniThreadLibrary/HEAD/tests/48_OtlParallelExceptions/app_48_OtlParallelExceptions.XE5.res -------------------------------------------------------------------------------- /makedownload.bat: -------------------------------------------------------------------------------- 1 | "C:\Program Files\7-Zip\7z.EXE" a -r OmniThreadLibrary.zip *.pas *.dproj *.dpk *.res *.dfm *.dpr *.dcr *.groupproj *.inc *.ico *.rc *.png 2 | "C:\Program Files\7-Zip\7z.EXE" a -r OmniThreadLibrary.zip -x*.dcu fastmm\*.* -------------------------------------------------------------------------------- /examples/checkVat/checkVat.dpr: -------------------------------------------------------------------------------- 1 | program checkVat; 2 | 3 | uses 4 | FastMM4, 5 | Vcl.Forms, 6 | checkVat1 in 'checkVat1.pas' {frmCheckVat}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmCheckVat, frmCheckVat); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/49_FramedWorkers/test_49_Common.pas: -------------------------------------------------------------------------------- 1 | unit test_49_Common; 2 | 3 | interface 4 | 5 | uses 6 | Messages; 7 | 8 | const 9 | 10 | // form -> thread messages; any number from range 0..65534 11 | MSG_HELLO = 1; 12 | 13 | // thread -> form messages; must start at WM_USER 14 | MSG_NOTIFY = WM_USER; 15 | 16 | implementation 17 | 18 | end. 19 | -------------------------------------------------------------------------------- /examples/forEach output/ForEachOutput.dpr: -------------------------------------------------------------------------------- 1 | program ForEachOutput; 2 | 3 | uses 4 | FastMM4, 5 | Vcl.Forms, 6 | ForEachOutput1 in 'ForEachOutput1.pas' {frmForEachOutput}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmForEachOutput, frmForEachOutput); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/17_MsgWait/app_17_MsgWait.dpr: -------------------------------------------------------------------------------- 1 | program app_17_MsgWait.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_17_MsgWait in 'test_17_MsgWait.pas' {frmTestMsgWait}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmTestMsgWait, frmTestMsgWait); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/39_Futures/app_39_Futures.dpr: -------------------------------------------------------------------------------- 1 | program app_39_Futures.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_39_Futures in 'test_39_Futures.pas' {frmFuturesDemo}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmFuturesDemo, frmFuturesDemo); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/54_LockManager/app_54_LockManager.dpr: -------------------------------------------------------------------------------- 1 | program app_54_LockManager; 2 | 3 | uses 4 | Vcl.Forms, 5 | test_54_LockManager in 'test_54_LockManager.pas' {frmTestLockManager}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmTestLockManager, frmTestLockManager); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/46_Async/app_46_Async.dpr: -------------------------------------------------------------------------------- 1 | program app_46_Async.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_46_Async in 'test_46_Async.pas' {frmDemoParallelAsync}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmDemoParallelAsync, frmDemoParallelAsync); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /examples/stringlist parser/StringListParser.dpr: -------------------------------------------------------------------------------- 1 | program StringListParser; 2 | 3 | uses 4 | FastMM4, 5 | Forms, 6 | StringListParser1 in 'StringListParser1.pas' {frmStringListParser}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmStringListParser, frmStringListParser); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/41_Cascade/app_41_Pipeline.dpr: -------------------------------------------------------------------------------- 1 | program app_41_Pipeline; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_41_Pipeline in 'test_41_Pipeline.pas' {frmPipelineDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmPipelineDemo, frmPipelineDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/34_TreeScan/app_34_TreeScan.dpr: -------------------------------------------------------------------------------- 1 | program app_34_TreeScan.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_34_TreeScan in 'test_34_TreeScan.pas' {frmTreeScanDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmTreeScanDemo, frmTreeScanDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/41_Pipeline/app_41_Pipeline.dpr: -------------------------------------------------------------------------------- 1 | program app_41_Pipeline.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_41_Pipeline in 'test_41_Pipeline.pas' {frmPipelineDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmPipelineDemo, frmPipelineDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/53_AsyncAwait/app_53_AsyncAwait.dpr: -------------------------------------------------------------------------------- 1 | program app_53_AsyncAwait.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_53_AsyncAwait in 'test_53_AsyncAwait.pas' {frmAsyncAwaitTest}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmAsyncAwaitTest, frmAsyncAwaitTest); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/38_OrderedFor/app_38_OrderedFor.dpr: -------------------------------------------------------------------------------- 1 | program app_38_OrderedFor.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_38_OrderedFor in 'test_38_OrderedFor.pas' {frmOderedForDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmOderedForDemo, frmOderedForDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/52_BackgroundWorker/app_52_BackgroundWorker.dpr: -------------------------------------------------------------------------------- 1 | program app_52_BackgroundWorker.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_52_BackgroundWorker in 'test_52_BackgroundWorker.pas' {Form16}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TForm16, Form16); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/28_Hooks/app_28_Hooks.dpr: -------------------------------------------------------------------------------- 1 | program app_28_Hooks.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_28_Hooks in 'test_28_Hooks.pas' {frmHooksDemo}, 9 | OtlHooks in '..\..\OtlHooks.pas'; 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmHooksDemo, frmHooksDemo); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/47_TaskConfig/app_47_TaskConfig.dpr: -------------------------------------------------------------------------------- 1 | program app_47_TaskConfig.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_47_TaskConfig in 'test_47_TaskConfig.pas' {frmDemoParallelTaskConfig}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmDemoParallelTaskConfig, frmDemoParallelTaskConfig); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/25_WaitableComm/app_25_WaitableComm.dpr: -------------------------------------------------------------------------------- 1 | program app_25_WaitableComm.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_25_WaitableComm in 'test_25_WaitableComm.pas' {frmWaitableCommDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmWaitableCommDemo, frmWaitableCommDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/37_ParallelJoin/app_37_ParallelJoin.dpr: -------------------------------------------------------------------------------- 1 | program app_37_ParallelJoin.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_37_ParallelJoin in 'test_37_ParallelJoin.pas' {frmTestParallelJoin}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmTestParallelJoin, frmTestParallelJoin); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/40_Mandelbrot/app_40_Mandelbrot.dpr: -------------------------------------------------------------------------------- 1 | program app_40_Mandelbrot.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_40_Mandelbrot in 'test_40_Mandelbrot.pas' {frmParallelMandelbrot}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmParallelMandelbrot, frmParallelMandelbrot); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/50_OmniValueArray/app_50_OmniValueArray.dpr: -------------------------------------------------------------------------------- 1 | program app_50_OmniValueArray.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_50_OmniValueArray in 'test_50_OmniValueArray.pas' {frmOmniValueArray}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmOmniValueArray, frmOmniValueArray); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /examples/twofish/TwoFish.dpr: -------------------------------------------------------------------------------- 1 | program TwoFish; 2 | 3 | uses 4 | Vcl.Forms, 5 | twofish1 in 'twofish1.pas' {frmTwoFish}, 6 | twoFishDB in 'twoFishDB.pas' {dmTwoFishDB: TDataModule}, 7 | twoFishDB_GUI in 'twoFishDB_GUI.pas' {frmTwoFishDB_GUI: TFrame}; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmTwoFish, frmTwoFish); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/27_RecursiveTree/app_27_RecursiveTree.dpr: -------------------------------------------------------------------------------- 1 | program app_27_RecursiveTree.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_27_RecursiveTree in 'test_27_RecursiveTree.pas' {frmRecursiveTreeDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmRecursiveTreeDemo, frmRecursiveTreeDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /examples/report generator/ReportGenerator.dpr: -------------------------------------------------------------------------------- 1 | program ReportGenerator; 2 | 3 | uses 4 | FastMM4, 5 | Vcl.Forms, 6 | reportGenerator1 in 'reportGenerator1.pas' {frmReportGenerator}, 7 | ReportGeneratorEngine in 'ReportGeneratorEngine.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmReportGenerator, frmReportGenerator); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/12_Lock/app_12_Lock.dpr: -------------------------------------------------------------------------------- 1 | program app_12_Lock.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_12_Lock in 'test_12_Lock.pas' {frmTestLock}, 8 | OtlComm in '..\..\OtlComm.pas', 9 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmTestLock, frmTestLock); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/22_TerminationTest/app_22_TerminationTest.dpr: -------------------------------------------------------------------------------- 1 | program app_22_TerminationTest.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_22_TerminationTest in 'test_22_TerminationTest.pas' {frmTerminationDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmTerminationDemo, frmTerminationDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/21_Anonymous_methods/app_21_Anonymous_methods.dpr: -------------------------------------------------------------------------------- 1 | program app_21_Anonymous_methods.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_21_Anonymous_methods in 'test_21_Anonymous_methods.pas' {frmAnonymousMethodsDemo}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmAnonymousMethodsDemo, frmAnonymousMethodsDemo); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/24_ConnectionPool/app_24_ConnectionPool.dpr: -------------------------------------------------------------------------------- 1 | program app_24_ConnectionPool.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_24_ConnectionPool in 'test_24_ConnectionPool.pas' {frmConnectionPoolDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmConnectionPoolDemo, frmConnectionPoolDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/26_MultiEventMonitor/app_26_MultiEventMonitor.dpr: -------------------------------------------------------------------------------- 1 | program app_26_MultiEventMonitor.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_26_MultiEventMonitor in 'test_26_MultiEventMonitor.pas' {frmMultiMonitorDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmMultiMonitorDemo, frmMultiMonitorDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/31_WaitableObjects/app_31_WaitableObjects.dpr: -------------------------------------------------------------------------------- 1 | program app_31_WaitableObjects.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_31_WaitableObjects in 'test_31_WaitableObjects.pas' {frmTestWaitableObjects}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmTestWaitableObjects, frmTestWaitableObjects); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/43_InvokeAnonymous/app_43_InvokeAnonymous.dpr: -------------------------------------------------------------------------------- 1 | program app_43_InvokeAnonymous.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_43_InvokeAnonymous in 'test_43_InvokeAnonymous.pas' {frmInvokeAnonymousDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmInvokeAnonymousDemo, frmInvokeAnonymousDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /examples/twofish/twofish1.dfm: -------------------------------------------------------------------------------- 1 | object frmTwoFish: TfrmTwoFish 2 | Left = 0 3 | Top = 0 4 | Caption = 'TwoFish' 5 | ClientHeight = 436 6 | ClientWidth = 755 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCloseQuery = FormCloseQuery 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | end 19 | -------------------------------------------------------------------------------- /tests/16_ChainTo/app_16_ChainTo.dpr: -------------------------------------------------------------------------------- 1 | program app_16_ChainTo.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | OtlComm in '..\..\OtlComm.pas', 8 | OtlTaskControl in '..\..\OtlTaskControl.pas', 9 | test_16_ChainTo in 'test_16_ChainTo.pas' {frmTestChainTo}; 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmTestChainTo, frmTestChainTo); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/35_ParallelFor/app_35_ParallelFor.dpr: -------------------------------------------------------------------------------- 1 | program app_35_ParallelFor.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_35_ParallelFor in 'test_35_ParallelFor.pas' {frmParallelForDemo}, 9 | OtlParallel in '..\..\OtlParallel.pas'; 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmParallelForDemo, frmParallelForDemo); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/40_Mandelbrot/test_40_Mandelbrot.dfm: -------------------------------------------------------------------------------- 1 | object frmParallelMandelbrot: TfrmParallelMandelbrot 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel Mandelbrot' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnDblClick = FormDblClick 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | end 18 | -------------------------------------------------------------------------------- /tests/15_TaskGroup/app_15_TaskGroup.dpr: -------------------------------------------------------------------------------- 1 | program app_15_TaskGroup.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_15_TaskGroup in 'test_15_TaskGroup.pas' {frmTestTaskGroup}, 8 | OtlComm in '..\..\OtlComm.pas', 9 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmTestTaskGroup, frmTestTaskGroup); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/30_AnonymousEventMonitor/app_30_AnonymousEventMonitor.dpr: -------------------------------------------------------------------------------- 1 | program app_30_AnonymousEventMonitor.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_30_AnonymousEventMonitor in 'test_30_AnonymousEventMonitor.pas' {frmAnonymousEventMonitorDemo}; 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TfrmAnonymousEventMonitorDemo, frmAnonymousEventMonitorDemo); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /tests/33_BlockingCollection/app_33_BlockingCollection.dpr: -------------------------------------------------------------------------------- 1 | program app_33_BlockingCollection.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | // FastMM4, 7 | Forms, 8 | test_33_BlockingCollection in 'test_33_BlockingCollection.pas' {frmTestOtlCollections}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmTestOmniBlockingCollection, frmTestOmniBlockingCollection); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/48_OtlParallelExceptions/app_48_OtlParallelExceptions.dpr: -------------------------------------------------------------------------------- 1 | program app_48_OtlParallelExceptions.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_48_OtlParallelExceptions in 'test_48_OtlParallelExceptions.pas' {frmOtlParallelExceptions}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmOtlParallelExceptions, frmOtlParallelExceptions); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/49_FramedWorkers/test_49_FramedWorkers.dfm: -------------------------------------------------------------------------------- 1 | object frmFramedWorkers: TfrmFramedWorkers 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form49' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | end 19 | -------------------------------------------------------------------------------- /tests/23_BackgroundFileSearch/app_23_BackgroundFileSearch.dpr: -------------------------------------------------------------------------------- 1 | program app_23_BackgroundFileSearch.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_23_BackgroundFileSearch in 'test_23_BackgroundFileSearch.pas' {frmBackgroundFileSearchDemo}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmBackgroundFileSearchDemo, frmBackgroundFileSearchDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/13_Exceptions/app_13_Exceptions.dpr: -------------------------------------------------------------------------------- 1 | program app_13_Exceptions.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_13_Exceptions in 'test_13_Exceptions.pas' {frmTestExceptions}, 9 | OtlComm in '..\..\OtlComm.pas', 10 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 11 | 12 | begin 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TfrmTestExceptions, frmTestExceptions); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /tests/36_ParallelAggregate/app_36_ParallelAggregate.dpr: -------------------------------------------------------------------------------- 1 | program app_36_ParallelAggregate.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_36_ParallelAggregate in 'test_36_ParallelAggregate.pas' {frmParallelAggregateDemo}, 8 | OtlDataManager in '..\..\OtlDataManager.pas'; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmParallelAggregateDemo, frmParallelAggregateDemo); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /tests/42_MessageQueue/app_42_MessageQueue.dpr: -------------------------------------------------------------------------------- 1 | program app_42_MessageQueue.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_42_MessageQueue in 'test_42_MessageQueue.pas' {frmTestMessageQueue}, 9 | OtlComm in '..\..\OtlComm.pas', 10 | OtlTask in '..\..\OtlTask.pas'; 11 | 12 | begin 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TfrmTestMessageQueue, frmTestMessageQueue); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /tests/14_TerminateWhen/app_14_TerminateWhen.dpr: -------------------------------------------------------------------------------- 1 | program app_14_TerminateWhen.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_14_TerminateWhen in 'test_14_TerminateWhen.pas' {frmTestTerminateWhen}, 8 | OtlComm in '..\..\OtlComm.pas', 9 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmTestTerminateWhen, frmTestTerminateWhen); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/51_PipelineStressTest/app_51_PipelineStressTest.dpr: -------------------------------------------------------------------------------- 1 | program app_51_PipelineStressTest.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_51_PipelineStressTest in 'test_51_PipelineStressTest.pas' {frmPipelineStressTest}; 9 | 10 | begin 11 | // ReportMemoryLeaksOnShutdown := True; 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TfrmPipelineStressTest, frmPipelineStressTest); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /tests/11_ThreadPool/app_11_ThreadPool.dpr: -------------------------------------------------------------------------------- 1 | program app_11_ThreadPool.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_11_ThreadPool in 'test_11_ThreadPool.pas' {frmTestOtlThreadPool}, 9 | OtlComm in '..\..\OtlComm.pas', 10 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 11 | 12 | begin 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TfrmTestOtlThreadPool, frmTestOtlThreadPool); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /tests/09_Communications/app_9_Communications.dpr: -------------------------------------------------------------------------------- 1 | program app_9_Communications.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_9_Communications in 'test_9_Communications.pas' {frmTestCommunications}, 9 | OtlComm in '..\..\OtlComm.pas', 10 | OtlTask in '..\..\OtlTask.pas'; 11 | 12 | begin 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TfrmTestCommunications, frmTestCommunications); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /tests/32_Queue/app_32_Queue.dpr: -------------------------------------------------------------------------------- 1 | program app_32_Queue.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_32_Queue in 'test_32_Queue.pas' {frmTestOmniQueue}; 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TfrmTestOmniQueue, frmTestOmniQueue); 14 | Application.CreateForm(TfrmTestOmniQueue, frmTestOmniQueue); 15 | Application.CreateForm(TfrmTestOmniQueue, frmTestOmniQueue); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /tests/10_Containers/app_10_Containers.dpr: -------------------------------------------------------------------------------- 1 | program app_10_Containers.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | OtlCommBufferTest, 9 | test_10_Containers in 'test_10_Containers.pas' {frmTestOtlContainers}, 10 | OtlComm in '..\..\OtlComm.pas', 11 | OtlTask in '..\..\OtlTask.pas'; 12 | 13 | begin 14 | Application.Initialize; 15 | Application.MainFormOnTaskbar := True; 16 | Application.CreateForm(TfrmTestOtlContainers, frmTestOtlContainers); 17 | Application.Run; 18 | end. 19 | -------------------------------------------------------------------------------- /tests/08_RegisterComm/app_8_RegisterComm.dpr: -------------------------------------------------------------------------------- 1 | program app_8_RegisterComm.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_8_RegisterComm in 'test_8_RegisterComm.pas' {frmTestRegisterComm}, 9 | OtlComm in '..\..\OtlComm.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlSync in '..\..\OtlSync.pas'; 12 | 13 | begin 14 | Application.Initialize; 15 | Application.MainFormOnTaskbar := True; 16 | Application.CreateForm(TfrmTestRegisterComm, frmTestRegisterComm); 17 | Application.Run; 18 | end. 19 | -------------------------------------------------------------------------------- /tests/20_QuickSort/app_20_QuickSort.dpr: -------------------------------------------------------------------------------- 1 | program app_20_QuickSort.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_20_QuickSort in 'test_20_QuickSort.pas' {frmQuickSortDemo}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmQuickSortDemo, frmQuickSortDemo); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/45_Fork-Join max/app_45_ForkJoinMax.dpr: -------------------------------------------------------------------------------- 1 | program app_45_ForkJoinMax; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_45_ForkJoinMax in 'test_45_ForkJoinMax.pas' {frmQuickSortDemo}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmQuickSortDemo, frmQuickSortDemo); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/49_FramedWorkers/app_49_FramedWorkers.dpr: -------------------------------------------------------------------------------- 1 | program app_49_FramedWorkers.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | Forms, 7 | test_49_FramedWorkers in 'test_49_FramedWorkers.pas' {frmFramedWorkers}, 8 | test_49_FrameWithWorker in 'test_49_FrameWithWorker.pas' {frmFrameWithWorker: TFrame}, 9 | test_49_Worker in 'test_49_Worker.pas', 10 | test_49_Common in 'test_49_Common.pas'; 11 | 12 | begin 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TfrmFramedWorkers, frmFramedWorkers); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /tests/00_Beep/test_0_Beep.dfm: -------------------------------------------------------------------------------- 1 | object frmTestSimple: TfrmTestSimple 2 | Left = 388 3 | Top = 174 4 | Caption = 'Simple test' 5 | ClientHeight = 77 6 | ClientWidth = 286 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnBeep: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 90 20 | Height = 25 21 | Caption = 'Beep' 22 | TabOrder = 0 23 | OnClick = btnBeepClick 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /tests/44_Fork-Join QuickSort/app_44_ForkJoinQuickSort.dpr: -------------------------------------------------------------------------------- 1 | program app_44_ForkJoinQuickSort.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_44_ForkJoinQuickSort in 'test_44_ForkJoinQuickSort.pas' {frmQuickSortDemo}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmQuickSortDemo, frmQuickSortDemo); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/18_StringMsgDispatch/app_18_StringMsgDispatch.dpr: -------------------------------------------------------------------------------- 1 | program app_18_StringMsgDispatch.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_18_StringMsgDispatch in 'test_18_StringMsgDispatch.pas' {frmTestStringMsgDispatch}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmTestStringMsgDispatch, frmTestStringMsgDispatch); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/19_StringMsgBenchmark/app_19_StringMsgBenchmark.dpr: -------------------------------------------------------------------------------- 1 | program app_19_StringMsgBenchmark.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_19_StringMsgBenchmark in 'test_19_StringMsgBenchmark.pas' {frmTestStringMsgBenchmark}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmTestStringMsgBenchmark, frmTestStringMsgBenchmark); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/04_TwoWayHello_with_package/app_4_TwoWayHello_with_package.dpr: -------------------------------------------------------------------------------- 1 | program app_4_TwoWayHello_with_package.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_4_TwoWayHello_with_package in 'test_4_TwoWayHello_with_package.pas' {frmTestTwoWayHello}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmTestTwoWayHello, frmTestTwoWayHello); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/05_TwoWayHello_without_loop/app_5_TwoWayHello_without_loop.dpr: -------------------------------------------------------------------------------- 1 | program app_5_TwoWayHello_without_loop.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_5_TwoWayHello_without_loop in 'test_5_TwoWayHello_without_loop.pas' {frmTestTwoWayHello}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmTestTwoWayHello, frmTestTwoWayHello); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /examples/forEach output/ForEachOutput1.dfm: -------------------------------------------------------------------------------- 1 | object frmForEachOutput: TfrmForEachOutput 2 | Left = 0 3 | Top = 0 4 | Caption = 'ForEach output' 5 | ClientHeight = 243 6 | ClientWidth = 527 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object ListBox1: TListBox 18 | Left = 0 19 | Top = 0 20 | Width = 527 21 | Height = 243 22 | Align = alClient 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /tests/07_InitTest/app_7_InitTest.dpr: -------------------------------------------------------------------------------- 1 | program app_7_InitTest.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_7_InitTest in 'test_7_InitTest.pas' {frmTestInit}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas', 13 | OtlContainers in '..\..\OtlContainers.pas', 14 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 15 | 16 | begin 17 | Application.Initialize; 18 | Application.MainFormOnTaskbar := True; 19 | Application.CreateForm(TfrmTestInit, frmTestInit); 20 | Application.Run; 21 | end. 22 | -------------------------------------------------------------------------------- /tests/06_TwoWayHello_with_object_worker/app_6_TwoWayHello_with_object_worker.dpr: -------------------------------------------------------------------------------- 1 | program app_6_TwoWayHello_with_object_worker.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_6_TwoWayHello_with_object_worker in 'test_6_TwoWayHello_with_object_worker.pas' {frmTestTwoWayHello}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas'; 13 | 14 | begin 15 | Application.Initialize; 16 | Application.MainFormOnTaskbar := True; 17 | Application.CreateForm(TfrmTestTwoWayHello, frmTestTwoWayHello); 18 | Application.Run; 19 | end. 20 | -------------------------------------------------------------------------------- /tests/02_TwoWayHello/app_2_TwoWayHello.dpr: -------------------------------------------------------------------------------- 1 | program app_2_TwoWayHello.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_2_TwoWayHello in 'test_2_TwoWayHello.pas' {frmTestTwoWayHello}, 9 | DSiWin32 in '..\..\src\DSiWin32.pas', 10 | OtlCommon in '..\..\OtlCommon.pas', 11 | OtlTask in '..\..\OtlTask.pas', 12 | OtlThreadPool in '..\..\OtlThreadPool.pas', 13 | OtlComm in '..\..\OtlComm.pas', 14 | OtlEventMonitor in '..\..\OtlEventMonitor.pas'; 15 | 16 | begin 17 | Application.Initialize; 18 | Application.MainFormOnTaskbar := True; 19 | Application.CreateForm(TfrmTestTwoWayHello, frmTestTwoWayHello); 20 | Application.Run; 21 | end. 22 | -------------------------------------------------------------------------------- /tests/29_ImplicitEventMonitor/app_29_ImplicitEventMonitor.dpr: -------------------------------------------------------------------------------- 1 | program app_29_ImplicitEventMonitor.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_29_ImplicitEventMonitor in 'test_29_ImplicitEventMonitor.pas' {frmImplicitEventMonitor}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas', 13 | OtlEventMonitor in '..\..\OtlEventMonitor.pas'; 14 | 15 | begin 16 | Application.Initialize; 17 | Application.MainFormOnTaskbar := True; 18 | Application.CreateForm(TfrmImplicitEventMonitor, frmImplicitEventMonitor); 19 | Application.Run; 20 | end. 21 | -------------------------------------------------------------------------------- /tests/49_FramedWorkers/test_49_FrameWithWorker.dfm: -------------------------------------------------------------------------------- 1 | object frmFrameWithWorker: TfrmFrameWithWorker 2 | Left = 0 3 | Top = 0 4 | Width = 320 5 | Height = 240 6 | TabOrder = 0 7 | DesignSize = ( 8 | 320 9 | 240) 10 | object lbLog: TListBox 11 | AlignWithMargins = True 12 | Left = 3 13 | Top = 3 14 | Width = 314 15 | Height = 198 16 | Align = alTop 17 | Anchors = [akLeft, akTop, akRight, akBottom] 18 | ItemHeight = 13 19 | TabOrder = 0 20 | end 21 | object btnHello: TButton 22 | Left = 107 23 | Top = 207 24 | Width = 102 25 | Height = 25 26 | Anchors = [akBottom] 27 | Caption = 'Hello, worker!' 28 | TabOrder = 1 29 | OnClick = btnHelloClick 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /tests/00_Beep/app_0_Beep.dpr: -------------------------------------------------------------------------------- 1 | program app_0_Beep.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_0_Beep in 'test_0_Beep.pas' {frmTestSimple}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas', 13 | DSiWin32 in '..\..\src\DSiWin32.pas', 14 | GpLists in '..\..\src\GpLists.pas', 15 | GpStuff in '..\..\src\GpStuff.pas', 16 | HVStringBuilder in '..\..\src\HVStringBuilder.pas', 17 | HVStringData in '..\..\src\HVStringData.pas'; 18 | 19 | begin 20 | Application.Initialize; 21 | Application.MainFormOnTaskbar := True; 22 | Application.CreateForm(TfrmTestSimple, frmTestSimple); 23 | Application.Run; 24 | end. 25 | -------------------------------------------------------------------------------- /examples/twofish/twoFishDB.pas: -------------------------------------------------------------------------------- 1 | unit twoFishDB; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Classes, Data.DB, IBCustomDataSet, IBTable, IBDatabase; 7 | 8 | type 9 | TdmTwoFishDB = class(TDataModule) 10 | IBDatabase1: TIBDatabase; 11 | IBTransaction1: TIBTransaction; 12 | IBTable1: TIBTable; 13 | IBTable1CATEGORY: TIBStringField; 14 | IBTable1SPECIES_NAME: TIBStringField; 15 | IBTable1LENGTH__CM_: TFloatField; 16 | IBTable1LENGTH_IN: TFloatField; 17 | IBTable1COMMON_NAME: TIBStringField; 18 | IBTable1NOTES: TMemoField; 19 | IBTable1GRAPHIC: TBlobField; 20 | private 21 | public 22 | end; 23 | 24 | var 25 | dmTwoFishDB: TdmTwoFishDB; 26 | 27 | implementation 28 | 29 | {%CLASSGROUP 'System.Classes.TPersistent'} 30 | 31 | {$R *.dfm} 32 | 33 | end. 34 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntime.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntime; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS ON} 16 | {$RANGECHECKS ON} 17 | {$REFERENCEINFO ON} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 26 | {$DESIGNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vcl, 32 | vclx, 33 | OmniThreadLibraryRuntime; 34 | 35 | contains 36 | OtlRegister in '..\OtlRegister.pas'; 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntimeXE; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 26 | {$DESIGNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vcl, 32 | vclx, 33 | OmniThreadLibraryRuntimeXE; 34 | 35 | contains 36 | OtlRegister in '..\OtlRegister.pas'; 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntime2009.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntime2009; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 26 | {$DESIGNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vcl, 32 | vclx, 33 | OmniThreadLibraryRuntime2009; 34 | 35 | contains 36 | OtlRegister in '..\OtlRegister.pas'; 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntime2010.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntime2010; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 26 | {$DESIGNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vcl, 32 | vclx, 33 | OmniThreadLibraryRuntime2010; 34 | 35 | contains 36 | OtlRegister in '..\OtlRegister.pas'; 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /tests/01_HelloWorld/test_1_HelloWorld.dfm: -------------------------------------------------------------------------------- 1 | object frmTestHelloWorld: TfrmTestHelloWorld 2 | Left = 0 3 | Top = 0 4 | Caption = 'Hello World' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 104 19 | Top = 0 20 | Width = 322 21 | Height = 286 22 | Align = alRight 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnHello: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 90 30 | Height = 25 31 | Caption = 'Hello, world!' 32 | TabOrder = 1 33 | OnClick = btnHelloClick 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /tests/00_Beep/test_0_Beep.pas: -------------------------------------------------------------------------------- 1 | unit test_0_Beep; 2 | 3 | interface 4 | 5 | uses 6 | Windows, SysUtils, Classes, Controls, StdCtrls, Forms, 7 | OtlTask, 8 | OtlTaskControl; 9 | 10 | type 11 | TfrmTestSimple = class(TForm) 12 | btnBeep: TButton; 13 | procedure btnBeepClick(Sender: TObject); 14 | private 15 | procedure Beep(const task: IOmniTask); 16 | end; 17 | 18 | var 19 | frmTestSimple: TfrmTestSimple; 20 | 21 | implementation 22 | 23 | uses 24 | DSiWin32; 25 | 26 | {$R *.dfm} 27 | 28 | { TfrmTestOTL } 29 | 30 | procedure TfrmTestSimple.btnBeepClick(Sender: TObject); 31 | begin 32 | CreateTask(Beep, 'Beep').Run; 33 | end; 34 | 35 | procedure TfrmTestSimple.Beep(const task: IOmniTask); 36 | begin 37 | //Executed in a background thread 38 | MessageBeep(MB_ICONEXCLAMATION); 39 | end; 40 | 41 | initialization 42 | Randomize; 43 | end. 44 | -------------------------------------------------------------------------------- /tests/03_HelloWorld_with_package/app_3_HelloWorld_with_package.dpr: -------------------------------------------------------------------------------- 1 | program app_3_HelloWorld_with_package.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_3_HelloWorld_with_package in 'test_3_HelloWorld_with_package.pas' {frmTestHelloWorld}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas', 13 | DSiWin32 in '..\..\src\DSiWin32.pas', 14 | GpLists in '..\..\src\GpLists.pas', 15 | GpStuff in '..\..\src\GpStuff.pas', 16 | HVStringBuilder in '..\..\src\HVStringBuilder.pas', 17 | HVStringData in '..\..\src\HVStringData.pas'; 18 | 19 | begin 20 | Application.Initialize; 21 | Application.MainFormOnTaskbar := True; 22 | Application.CreateForm(TfrmTestHelloWorld, frmTestHelloWorld); 23 | Application.Run; 24 | end. 25 | -------------------------------------------------------------------------------- /tests/30_AnonymousEventMonitor/test_30_AnonymousEventMonitor.dfm: -------------------------------------------------------------------------------- 1 | object frmAnonymousEventMonitorDemo: TfrmAnonymousEventMonitorDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Anonymous event monitor' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 104 18 | Top = 0 19 | Width = 322 20 | Height = 286 21 | Align = alRight 22 | ItemHeight = 13 23 | TabOrder = 0 24 | end 25 | object btnHello: TButton 26 | Left = 8 27 | Top = 8 28 | Width = 90 29 | Height = 25 30 | Caption = 'Hello, world!' 31 | TabOrder = 1 32 | OnClick = btnHelloClick 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /tests/46_Async/test_46_Async.dfm: -------------------------------------------------------------------------------- 1 | object frmDemoParallelAsync: TfrmDemoParallelAsync 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel.Async tester' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnAsync: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 75 20 | Height = 25 21 | Caption = 'Async' 22 | TabOrder = 0 23 | OnClick = btnAsyncClick 24 | end 25 | object lbLog: TListBox 26 | Left = 89 27 | Top = 0 28 | Width = 546 29 | Height = 337 30 | Align = alRight 31 | Anchors = [akLeft, akTop, akRight, akBottom] 32 | ItemHeight = 13 33 | TabOrder = 1 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /tests/19_StringMsgBenchmark/test_19_StringMsgBenchmark.dfm: -------------------------------------------------------------------------------- 1 | object frmTestStringMsgBenchmark: TfrmTestStringMsgBenchmark 2 | Left = 0 3 | Top = 0 4 | Caption = 'String and method message dispatch' 5 | ClientHeight = 286 6 | ClientWidth = 596 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnStartBenchmark: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 106 20 | Height = 25 21 | Caption = 'Start benchmark' 22 | TabOrder = 0 23 | OnClick = btnStartBenchmarkClick 24 | end 25 | object lbLog: TListBox 26 | Left = 120 27 | Top = 0 28 | Width = 476 29 | Height = 286 30 | Align = alRight 31 | Anchors = [akLeft, akTop, akRight, akBottom] 32 | ItemHeight = 13 33 | TabOrder = 1 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE2.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntimeXE2; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 29 | {$DESIGNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vcl, 35 | vclx, 36 | OmniThreadLibraryRuntimeXE2; 37 | 38 | contains 39 | OtlRegister in '..\OtlRegister.pas'; 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE3.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntimeXE3; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 29 | {$DESIGNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vcl, 35 | vclx, 36 | OmniThreadLibraryRuntimeXE3; 37 | 38 | contains 39 | OtlRegister in '..\OtlRegister.pas'; 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE4.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntimeXE4; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 29 | {$DESIGNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vcl, 35 | vclx, 36 | OmniThreadLibraryRuntimeXE4; 37 | 38 | contains 39 | OtlRegister in '..\OtlRegister.pas'; 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryDesigntimeXE5.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryDesigntimeXE5; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary designtime'} 29 | {$DESIGNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vcl, 35 | vclx, 36 | OmniThreadLibraryRuntimeXE4; 37 | 38 | contains 39 | OtlRegister in '..\OtlRegister.pas'; 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /tests/28_Hooks/test_28_Hooks.dfm: -------------------------------------------------------------------------------- 1 | object frmHooksDemo: TfrmHooksDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Hooks demo' 5 | ClientHeight = 245 6 | ClientWidth = 472 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object lbLog: TListBox 19 | Left = 89 20 | Top = 0 21 | Width = 383 22 | Height = 245 23 | Align = alRight 24 | ItemHeight = 13 25 | TabOrder = 0 26 | end 27 | object btnRunTask: TButton 28 | Left = 8 29 | Top = 8 30 | Width = 75 31 | Height = 25 32 | Caption = 'Run task' 33 | TabOrder = 1 34 | OnClick = btnRunTaskClick 35 | end 36 | object OtlMonitor: TOmniEventMonitor 37 | Left = 8 38 | Top = 208 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /tests/49_FramedWorkers/test_49_FrameWithWorker.pas: -------------------------------------------------------------------------------- 1 | unit test_49_FrameWithWorker; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, 8 | OtlComm, 9 | OtlTaskControl, 10 | test_49_Common; 11 | 12 | type 13 | TfrmFrameWithWorker = class(TFrame) 14 | lbLog: TListBox; 15 | btnHello: TButton; 16 | procedure btnHelloClick(Sender: TObject); 17 | private 18 | FWorker: IOmniTaskControl; 19 | public 20 | property Worker: IOmniTaskControl read FWorker write FWorker; 21 | procedure MsgNotify(var msg: TOmniMessage); message MSG_NOTIFY; 22 | end; 23 | 24 | implementation 25 | 26 | {$R *.dfm} 27 | 28 | procedure TfrmFrameWithWorker.btnHelloClick(Sender: TObject); 29 | begin 30 | Worker.Comm.Send(MSG_HELLO, Name); 31 | end; 32 | 33 | procedure TfrmFrameWithWorker.MsgNotify(var msg: TOmniMessage); 34 | begin 35 | lbLog.ItemIndex := lbLog.Items.Add(msg.MsgData); 36 | end; 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /tests/49_FramedWorkers/test_49_Worker.pas: -------------------------------------------------------------------------------- 1 | unit test_49_Worker; 2 | 3 | interface 4 | 5 | uses 6 | OtlComm, 7 | OtlTaskControl, 8 | test_49_Common; 9 | 10 | type 11 | TFramedWorker = class(TOmniWorker) 12 | strict private 13 | FMessage: string; 14 | public 15 | function Initialize: boolean; override; 16 | procedure MsgHello(var msg: TOmniMessage); message MSG_HELLO; 17 | procedure Timer1; 18 | end; 19 | 20 | implementation 21 | 22 | { TFramedWorker } 23 | 24 | function TFramedWorker.Initialize: boolean; 25 | begin 26 | Result := inherited Initialize; 27 | if Result then begin 28 | FMessage := Task.Param['Msg']; 29 | Task.SetTimer(1, 1000 + Random(500), @TFramedWorker.Timer1); 30 | end; 31 | end; 32 | 33 | procedure TFramedWorker.MsgHello(var msg: TOmniMessage); 34 | begin 35 | Task.Comm.Send(MSG_NOTIFY, 'Hello, ' + msg.MsgData); 36 | end; 37 | 38 | procedure TFramedWorker.Timer1; 39 | begin 40 | Task.Comm.Send(MSG_NOTIFY, '... ' + FMessage); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /tests/01_HelloWorld/app_1_HelloWorld.dpr: -------------------------------------------------------------------------------- 1 | program app_1_HelloWorld.XE3; 2 | 3 | {$R 'MainIcon.res' '..\..\res\MainIcon.rc'} 4 | 5 | uses 6 | FastMM4, 7 | Forms, 8 | test_1_HelloWorld in 'test_1_HelloWorld.pas' {frmTestHelloWorld}, 9 | OtlCommon in '..\..\OtlCommon.pas', 10 | OtlTask in '..\..\OtlTask.pas', 11 | OtlThreadPool in '..\..\OtlThreadPool.pas', 12 | OtlComm in '..\..\OtlComm.pas', 13 | DSiWin32 in '..\..\src\DSiWin32.pas', 14 | GpLists in '..\..\src\GpLists.pas', 15 | GpStuff in '..\..\src\GpStuff.pas', 16 | HVStringBuilder in '..\..\src\HVStringBuilder.pas', 17 | HVStringData in '..\..\src\HVStringData.pas', 18 | OtlContainers in '..\..\OtlContainers.pas', 19 | OtlCommBufferTest in '..\..\OtlCommBufferTest.pas', 20 | OtlEventMonitor in '..\..\OtlEventMonitor.pas', 21 | OtlTaskControl in '..\..\OtlTaskControl.pas'; 22 | 23 | begin 24 | Application.Initialize; 25 | Application.MainFormOnTaskbar := True; 26 | Application.CreateForm(TfrmTestHelloWorld, frmTestHelloWorld); 27 | Application.Run; 28 | end. 29 | -------------------------------------------------------------------------------- /tests/21_Anonymous_methods/test_21_Anonymous_methods.dfm: -------------------------------------------------------------------------------- 1 | object frmAnonymousMethodsDemo: TfrmAnonymousMethodsDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Anonymous methods' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 104 18 | Top = 0 19 | Width = 322 20 | Height = 286 21 | Align = alRight 22 | ItemHeight = 13 23 | TabOrder = 0 24 | end 25 | object btnHello: TButton 26 | Left = 8 27 | Top = 8 28 | Width = 90 29 | Height = 25 30 | Caption = 'Hello, world!' 31 | TabOrder = 1 32 | OnClick = btnHelloClick 33 | end 34 | object OTLMonitor: TOmniEventMonitor 35 | OnTaskMessage = OTLMonitorTaskMessage 36 | OnTaskTerminated = OTLMonitorTaskTerminated 37 | Left = 32 38 | Top = 232 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /tests/53_AsyncAwait/test_53_AsyncAwait.dfm: -------------------------------------------------------------------------------- 1 | object frmAsyncAwaitTest: TfrmAsyncAwaitTest 2 | Left = 0 3 | Top = 0 4 | Caption = 'Async/Await test' 5 | ClientHeight = 70 6 | ClientWidth = 301 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnSleep1: TButton 17 | Left = 24 18 | Top = 24 19 | Width = 75 20 | Height = 25 21 | Caption = 'Sleep' 22 | TabOrder = 0 23 | OnClick = btnSleep1Click 24 | end 25 | object btnSleep2: TButton 26 | Left = 112 27 | Top = 24 28 | Width = 75 29 | Height = 25 30 | Caption = 'Sleep' 31 | TabOrder = 1 32 | OnClick = btnSleep1Click 33 | end 34 | object btnSleep3: TButton 35 | Left = 200 36 | Top = 24 37 | Width = 75 38 | Height = 25 39 | Caption = 'Sleep' 40 | TabOrder = 2 41 | OnClick = btnSleep1Click 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /tests/09_Communications/test_9_Communications.dfm: -------------------------------------------------------------------------------- 1 | object frmTestCommunications: TfrmTestCommunications 2 | Left = 0 3 | Top = 0 4 | Caption = 'Communications tester' 5 | ClientHeight = 306 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object lbLog: TListBox 19 | Left = 89 20 | Top = 0 21 | Width = 337 22 | Height = 306 23 | Align = alRight 24 | ItemHeight = 13 25 | TabOrder = 0 26 | end 27 | object btnRunTests: TButton 28 | Left = 8 29 | Top = 8 30 | Width = 75 31 | Height = 25 32 | Caption = 'Test' 33 | TabOrder = 1 34 | OnClick = btnRunTestsClick 35 | end 36 | object OmniEventMonitor1: TOmniEventMonitor 37 | OnTaskMessage = OmniEventMonitor1TaskMessage 38 | Left = 8 39 | Top = 248 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /tests/16_ChainTo/test_16_ChainTo.dfm: -------------------------------------------------------------------------------- 1 | object frmTestChainTo: TfrmTestChainTo 2 | Left = 0 3 | Top = 0 4 | Caption = 'ChainTo tester' 5 | ClientHeight = 306 6 | ClientWidth = 611 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 143 18 | Top = 0 19 | Width = 468 20 | Height = 306 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartTasks: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 129 30 | Height = 25 31 | Caption = 'Start tasks' 32 | TabOrder = 1 33 | OnClick = btnStartTasksClick 34 | end 35 | object OmniTED: TOmniEventMonitor 36 | OnTaskMessage = OmniTEDTaskMessage 37 | OnTaskTerminated = OmniTEDTaskTerminated 38 | Left = 8 39 | Top = 264 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /tests/51_PipelineStressTest/test_51_PipelineStressTest.dfm: -------------------------------------------------------------------------------- 1 | object frmPipelineStressTest: TfrmPipelineStressTest 2 | Left = 0 3 | Top = 0 4 | Caption = 'Pipeline stress test' 5 | ClientHeight = 285 6 | ClientWidth = 418 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lblStatus: TLabel 18 | Left = 16 19 | Top = 72 20 | Width = 41 21 | Height = 13 22 | Caption = 'lblStatus' 23 | end 24 | object btStartStop: TButton 25 | Left = 144 26 | Top = 32 27 | Width = 97 28 | Height = 25 29 | Caption = 'Run test' 30 | TabOrder = 0 31 | OnClick = btStartStopClick 32 | end 33 | object Memo1: TMemo 34 | Left = 8 35 | Top = 96 36 | Width = 402 37 | Height = 169 38 | Lines.Strings = ( 39 | 'Memo1') 40 | TabOrder = 1 41 | WordWrap = False 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /examples/checkVat/checkVat.skincfg: -------------------------------------------------------------------------------- 1 | [ExpressSkins] 2 | Default=1 3 | ShowNotifications=1 4 | Enabled=1 5 | dxSkinBlack=1 6 | dxSkinBlue=1 7 | dxSkinBlueprint=1 8 | dxSkinCaramel=1 9 | dxSkinCoffee=1 10 | dxSkinDarkRoom=1 11 | dxSkinDarkSide=1 12 | dxSkinDevExpressDarkStyle=1 13 | dxSkinDevExpressStyle=1 14 | dxSkinFoggy=1 15 | dxSkinGlassOceans=1 16 | dxSkinHighContrast=1 17 | dxSkiniMaginary=1 18 | dxSkinLilian=1 19 | dxSkinLiquidSky=1 20 | dxSkinLondonLiquidSky=1 21 | dxSkinMcSkin=1 22 | dxSkinMoneyTwins=1 23 | dxSkinOffice2007Black=1 24 | dxSkinOffice2007Blue=1 25 | dxSkinOffice2007Green=1 26 | dxSkinOffice2007Pink=1 27 | dxSkinOffice2007Silver=1 28 | dxSkinOffice2010Black=1 29 | dxSkinOffice2010Blue=1 30 | dxSkinOffice2010Silver=1 31 | dxSkinPumpkin=1 32 | dxSkinSeven=1 33 | dxSkinSevenClassic=1 34 | dxSkinSharp=1 35 | dxSkinSharpPlus=1 36 | dxSkinSilver=1 37 | dxSkinSpringTime=1 38 | dxSkinStardust=1 39 | dxSkinSummer2008=1 40 | dxSkinTheAsphaltWorld=1 41 | dxSkinsDefaultPainters=1 42 | dxSkinValentine=1 43 | dxSkinVS2010=1 44 | dxSkinWhiteprint=1 45 | dxSkinXmas2008Blue=1 46 | -------------------------------------------------------------------------------- /tests/03_HelloWorld_with_package/test_3_HelloWorld_with_package.dfm: -------------------------------------------------------------------------------- 1 | object frmTestHelloWorld: TfrmTestHelloWorld 2 | Left = 0 3 | Top = 0 4 | Caption = 'Hello World w/ package' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 104 18 | Top = 0 19 | Width = 322 20 | Height = 286 21 | Align = alRight 22 | ItemHeight = 13 23 | TabOrder = 0 24 | end 25 | object btnHello: TButton 26 | Left = 8 27 | Top = 8 28 | Width = 90 29 | Height = 25 30 | Caption = 'Hello, world!' 31 | TabOrder = 1 32 | OnClick = btnHelloClick 33 | end 34 | object OmniEventMonitor1: TOmniEventMonitor 35 | OnTaskMessage = OmniEventMonitor1TaskMessage 36 | OnTaskTerminated = OmniEventMonitor1TaskTerminated 37 | Left = 16 38 | Top = 48 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /examples/forEach output/ForEachOutput.skincfg: -------------------------------------------------------------------------------- 1 | [ExpressSkins] 2 | Default=0 3 | ShowNotifications=1 4 | Enabled=1 5 | dxSkinsDefaultPainters=1 6 | dxSkinBlack=1 7 | dxSkinBlue=1 8 | dxSkinBlueprint=1 9 | dxSkinCaramel=1 10 | dxSkinCoffee=1 11 | dxSkinDarkRoom=1 12 | dxSkinDarkSide=1 13 | dxSkinDevExpressDarkStyle=1 14 | dxSkinDevExpressStyle=1 15 | dxSkinFoggy=1 16 | dxSkinGlassOceans=1 17 | dxSkinHighContrast=1 18 | dxSkiniMaginary=1 19 | dxSkinLilian=1 20 | dxSkinLiquidSky=1 21 | dxSkinLondonLiquidSky=1 22 | dxSkinMcSkin=1 23 | dxSkinMoneyTwins=1 24 | dxSkinOffice2007Black=1 25 | dxSkinOffice2007Blue=1 26 | dxSkinOffice2007Green=1 27 | dxSkinOffice2007Pink=1 28 | dxSkinOffice2007Silver=1 29 | dxSkinOffice2010Black=1 30 | dxSkinOffice2010Blue=1 31 | dxSkinOffice2010Silver=1 32 | dxSkinPumpkin=1 33 | dxSkinSeven=1 34 | dxSkinSevenClassic=1 35 | dxSkinSharp=1 36 | dxSkinSharpPlus=1 37 | dxSkinSilver=1 38 | dxSkinSpringTime=1 39 | dxSkinStardust=1 40 | dxSkinSummer2008=1 41 | dxSkinTheAsphaltWorld=1 42 | dxSkinValentine=1 43 | dxSkinVS2010=1 44 | dxSkinWhiteprint=1 45 | dxSkinXmas2008Blue=1 46 | -------------------------------------------------------------------------------- /tests/53_AsyncAwait/app_53_AsyncAwait.skincfg: -------------------------------------------------------------------------------- 1 | [ExpressSkins] 2 | Default=0 3 | ShowNotifications=1 4 | Enabled=1 5 | dxSkinBlack=1 6 | dxSkinBlue=1 7 | dxSkinBlueprint=1 8 | dxSkinCaramel=1 9 | dxSkinCoffee=1 10 | dxSkinDarkRoom=1 11 | dxSkinDarkSide=1 12 | dxSkinDevExpressDarkStyle=1 13 | dxSkinDevExpressStyle=1 14 | dxSkinFoggy=1 15 | dxSkinGlassOceans=1 16 | dxSkinHighContrast=1 17 | dxSkiniMaginary=1 18 | dxSkinLilian=1 19 | dxSkinLiquidSky=1 20 | dxSkinLondonLiquidSky=1 21 | dxSkinMcSkin=1 22 | dxSkinMoneyTwins=1 23 | dxSkinOffice2007Black=1 24 | dxSkinOffice2007Blue=1 25 | dxSkinOffice2007Green=1 26 | dxSkinOffice2007Pink=1 27 | dxSkinOffice2007Silver=1 28 | dxSkinOffice2010Black=1 29 | dxSkinOffice2010Blue=1 30 | dxSkinOffice2010Silver=1 31 | dxSkinPumpkin=1 32 | dxSkinSeven=1 33 | dxSkinSevenClassic=1 34 | dxSkinSharp=1 35 | dxSkinSharpPlus=1 36 | dxSkinSilver=1 37 | dxSkinSpringTime=1 38 | dxSkinStardust=1 39 | dxSkinSummer2008=1 40 | dxSkinTheAsphaltWorld=1 41 | dxSkinsDefaultPainters=1 42 | dxSkinValentine=1 43 | dxSkinVS2010=1 44 | dxSkinWhiteprint=1 45 | dxSkinXmas2008Blue=1 46 | -------------------------------------------------------------------------------- /examples/report generator/ReportGenerator.skincfg: -------------------------------------------------------------------------------- 1 | [ExpressSkins] 2 | Default=0 3 | ShowNotifications=1 4 | Enabled=1 5 | dxSkinBlack=1 6 | dxSkinBlue=1 7 | dxSkinBlueprint=1 8 | dxSkinCaramel=1 9 | dxSkinCoffee=1 10 | dxSkinDarkRoom=1 11 | dxSkinDarkSide=1 12 | dxSkinDevExpressDarkStyle=1 13 | dxSkinDevExpressStyle=1 14 | dxSkinFoggy=1 15 | dxSkinGlassOceans=1 16 | dxSkinHighContrast=1 17 | dxSkiniMaginary=1 18 | dxSkinLilian=1 19 | dxSkinLiquidSky=1 20 | dxSkinLondonLiquidSky=1 21 | dxSkinMcSkin=1 22 | dxSkinMoneyTwins=1 23 | dxSkinOffice2007Black=1 24 | dxSkinOffice2007Blue=1 25 | dxSkinOffice2007Green=1 26 | dxSkinOffice2007Pink=1 27 | dxSkinOffice2007Silver=1 28 | dxSkinOffice2010Black=1 29 | dxSkinOffice2010Blue=1 30 | dxSkinOffice2010Silver=1 31 | dxSkinPumpkin=1 32 | dxSkinSeven=1 33 | dxSkinSevenClassic=1 34 | dxSkinSharp=1 35 | dxSkinSharpPlus=1 36 | dxSkinSilver=1 37 | dxSkinSpringTime=1 38 | dxSkinStardust=1 39 | dxSkinSummer2008=1 40 | dxSkinTheAsphaltWorld=1 41 | dxSkinsDefaultPainters=1 42 | dxSkinValentine=1 43 | dxSkinVS2010=1 44 | dxSkinWhiteprint=1 45 | dxSkinXmas2008Blue=1 46 | -------------------------------------------------------------------------------- /tests/53_AsyncAwait/test_53_AsyncAwait.pas: -------------------------------------------------------------------------------- 1 | unit test_53_AsyncAwait; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, 7 | StdCtrls; 8 | 9 | type 10 | TfrmAsyncAwaitTest = class(TForm) 11 | btnSleep1: TButton; 12 | btnSleep2: TButton; 13 | btnSleep3: TButton; 14 | procedure btnSleep1Click(Sender: TObject); 15 | private 16 | { Private declarations } 17 | public 18 | { Public declarations } 19 | end; 20 | 21 | var 22 | frmAsyncAwaitTest: TfrmAsyncAwaitTest; 23 | 24 | implementation 25 | 26 | uses 27 | OtlParallel; 28 | 29 | {$R *.dfm} 30 | 31 | procedure TfrmAsyncAwaitTest.btnSleep1Click(Sender: TObject); 32 | var 33 | button: TButton; 34 | begin 35 | button := Sender as TButton; 36 | button.Caption := 'Working ...'; 37 | button.Enabled := false; 38 | Async( 39 | procedure begin 40 | Sleep(5000); 41 | end) 42 | .Await( 43 | procedure begin 44 | button.Enabled := true; 45 | button.Caption := 'Done!'; 46 | end); 47 | end; 48 | 49 | end. 50 | -------------------------------------------------------------------------------- /tests/46_Async/test_46_Async.pas: -------------------------------------------------------------------------------- 1 | unit test_46_Async; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, 8 | OtlComm; 9 | 10 | type 11 | TfrmDemoParallelAsync = class(TForm) 12 | btnAsync: TButton; 13 | lbLog: TListBox; 14 | procedure btnAsyncClick(Sender: TObject); 15 | private 16 | public 17 | end; 18 | 19 | var 20 | frmDemoParallelAsync: TfrmDemoParallelAsync; 21 | 22 | implementation 23 | 24 | uses 25 | OtlTaskControl, 26 | OtlParallel; 27 | 28 | {$R *.dfm} 29 | 30 | procedure TfrmDemoParallelAsync.btnAsyncClick(Sender: TObject); 31 | begin 32 | btnAsync.Enabled := false; 33 | 34 | Parallel.Async( 35 | procedure 36 | begin 37 | // executed in background thread 38 | Sleep(500); 39 | MessageBeep($FFFFFFFF); 40 | end, 41 | Parallel.TaskConfig.OnTerminated( 42 | procedure (const task: IOmniTaskControl) 43 | begin 44 | // executed in main thread 45 | btnAsync.Enabled := true; 46 | end 47 | ) 48 | ); 49 | end; 50 | 51 | end. 52 | -------------------------------------------------------------------------------- /tests/41_Cascade/test_41_Pipeline.dfm: -------------------------------------------------------------------------------- 1 | object frmPipelineDemo: TfrmPipelineDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Cascade/pipeline demo' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 119 18 | Top = 0 19 | Width = 516 20 | Height = 337 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnPipeline: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 105 30 | Height = 25 31 | Caption = 'Parallel.Pipeline' 32 | TabOrder = 1 33 | OnClick = btnPipelineClick 34 | end 35 | object btnPipelineNoWait: TButton 36 | Left = 8 37 | Top = 39 38 | Width = 105 39 | Height = 25 40 | Caption = 'Pipeline.NoWait' 41 | TabOrder = 2 42 | OnClick = btnPipelineNoWaitClick 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /tests/45_Fork-Join max/test_45_ForkJoinMax.dfm: -------------------------------------------------------------------------------- 1 | object frmQuickSortDemo: TfrmQuickSortDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel Maximum Finder' 5 | ClientHeight = 286 6 | ClientWidth = 596 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object btnMaxOnOne: TButton 18 | Left = 8 19 | Top = 8 20 | Width = 106 21 | Height = 25 22 | Caption = 'Sequential max' 23 | TabOrder = 0 24 | OnClick = btnMaxOnOneClick 25 | end 26 | object lbLog: TListBox 27 | Left = 120 28 | Top = 0 29 | Width = 476 30 | Height = 286 31 | Align = alRight 32 | Anchors = [akLeft, akTop, akRight, akBottom] 33 | ItemHeight = 13 34 | TabOrder = 1 35 | end 36 | object btnMaxOnAll: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 106 40 | Height = 25 41 | Caption = 'Parallel max' 42 | TabOrder = 2 43 | OnClick = btnMaxOnAllClick 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /tests/44_Fork-Join QuickSort/test_44_ForkJoinQuickSort.dfm: -------------------------------------------------------------------------------- 1 | object frmQuickSortDemo: TfrmQuickSortDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel QuickSort' 5 | ClientHeight = 286 6 | ClientWidth = 596 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object btnSortOnOne: TButton 18 | Left = 8 19 | Top = 8 20 | Width = 106 21 | Height = 25 22 | Caption = 'Sequential sort' 23 | TabOrder = 0 24 | OnClick = btnSortOnOneClick 25 | end 26 | object lbLog: TListBox 27 | Left = 120 28 | Top = 0 29 | Width = 476 30 | Height = 286 31 | Align = alRight 32 | Anchors = [akLeft, akTop, akRight, akBottom] 33 | ItemHeight = 13 34 | TabOrder = 1 35 | end 36 | object btnSortOnAll: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 106 40 | Height = 25 41 | Caption = 'Parallel sort' 42 | TabOrder = 2 43 | OnClick = btnSortOnAllClick 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /unittests/GUIRunner.dpr: -------------------------------------------------------------------------------- 1 | program GUIRunner; 2 | { 3 | 4 | Delphi DUnit Test Project 5 | ------------------------- 6 | This project contains the DUnit test framework and the GUI/Console test runners. 7 | Add "CONSOLE_TESTRUNNER" to the conditional defines entry in the project options 8 | to use the console test runner. Otherwise the GUI test runner will be used by 9 | default. 10 | 11 | } 12 | 13 | {$IFDEF CONSOLE_TESTRUNNER} 14 | {$APPTYPE CONSOLE} 15 | {$ENDIF} 16 | 17 | uses 18 | FastMM4, 19 | Forms, 20 | TestFramework, 21 | GUITestRunner, 22 | TextTestRunner, 23 | TestBlockingCollection1 in 'TestBlockingCollection1.pas', 24 | TestOtlDataManager1 in 'TestOtlDataManager1.pas', 25 | OtlCollections in '..\OtlCollections.pas', 26 | TestOmniInterfaceDictionary in 'TestOmniInterfaceDictionary.pas', 27 | OtlCommon in '..\OtlCommon.pas', 28 | TestOmniValue in 'TestOmniValue.pas', 29 | TestValue in 'TestValue.pas'; 30 | 31 | {$R *.RES} 32 | 33 | begin 34 | Application.Initialize; 35 | if IsConsole then 36 | with TextTestRunner.RunRegisteredTests do 37 | Free 38 | else 39 | GUITestRunner.RunRegisteredTests; 40 | end. 41 | 42 | -------------------------------------------------------------------------------- /tests/20_QuickSort/test_20_QuickSort.dfm: -------------------------------------------------------------------------------- 1 | object frmQuickSortDemo: TfrmQuickSortDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel QuickSort' 5 | ClientHeight = 286 6 | ClientWidth = 596 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnSortOnOne: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 106 20 | Height = 25 21 | Caption = 'Start on 1 core' 22 | TabOrder = 0 23 | OnClick = btnSort 24 | end 25 | object lbLog: TListBox 26 | Left = 120 27 | Top = 0 28 | Width = 476 29 | Height = 286 30 | Align = alRight 31 | Anchors = [akLeft, akTop, akRight, akBottom] 32 | ItemHeight = 13 33 | TabOrder = 1 34 | end 35 | object btnSortOnAll: TButton 36 | Left = 8 37 | Top = 39 38 | Width = 106 39 | Height = 25 40 | Caption = 'Start on all cores' 41 | TabOrder = 2 42 | OnClick = btnSort 43 | end 44 | object OtlEventMonitor1: TOmniEventMonitor 45 | OnTaskMessage = OtlEventMonitor1TaskMessage 46 | Left = 8 47 | Top = 248 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /tests/07_InitTest/test_7_InitTest.dfm: -------------------------------------------------------------------------------- 1 | object frmTestInit: TfrmTestInit 2 | Left = 0 3 | Top = 0 4 | Caption = 'Init tester' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 104 18 | Top = 0 19 | Width = 322 20 | Height = 286 21 | Align = alRight 22 | ItemHeight = 13 23 | TabOrder = 0 24 | end 25 | object btnTestSuccess: TButton 26 | Left = 8 27 | Top = 8 28 | Width = 90 29 | Height = 25 30 | Caption = 'Successful init' 31 | TabOrder = 1 32 | OnClick = btnTestSuccessClick 33 | end 34 | object btnTestFailure: TButton 35 | Left = 8 36 | Top = 39 37 | Width = 90 38 | Height = 25 39 | Caption = 'Failed init' 40 | TabOrder = 2 41 | OnClick = btnTestFailureClick 42 | end 43 | object OmniEventMonitor1: TOmniEventMonitor 44 | OnTaskMessage = OmniEventMonitor1TaskMessage 45 | OnTaskTerminated = OmniEventMonitor1TaskTerminated 46 | Left = 8 47 | Top = 248 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /tests/14_TerminateWhen/test_14_TerminateWhen.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTerminateWhen: TfrmTestTerminateWhen 2 | Left = 0 3 | Top = 0 4 | Caption = 'TerminateWhen tester' 5 | ClientHeight = 306 6 | ClientWidth = 611 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 143 18 | Top = 0 19 | Width = 468 20 | Height = 306 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartTasks: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 129 30 | Height = 25 31 | Caption = 'Start tasks' 32 | TabOrder = 1 33 | OnClick = btnStartTasksClick 34 | end 35 | object btnStopTasks: TButton 36 | Left = 8 37 | Top = 39 38 | Width = 129 39 | Height = 25 40 | Caption = 'Stop tasks' 41 | TabOrder = 2 42 | OnClick = btnStopTasksClick 43 | end 44 | object OmniTED: TOmniEventMonitor 45 | OnTaskTerminated = OmniTEDTaskTerminated 46 | Left = 8 47 | Top = 264 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /tests/25_WaitableComm/test_25_WaitableComm.dfm: -------------------------------------------------------------------------------- 1 | object frmWaitableCommDemo: TfrmWaitableCommDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Waitable Comm Demo' 5 | ClientHeight = 245 6 | ClientWidth = 472 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | DesignSize = ( 15 | 472 16 | 245) 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object lbLog: TListBox 20 | AlignWithMargins = True 21 | Left = 89 22 | Top = 0 23 | Width = 383 24 | Height = 245 25 | Margins.Left = 0 26 | Margins.Top = 89 27 | Margins.Right = 0 28 | Margins.Bottom = 0 29 | Anchors = [akLeft, akTop, akRight, akBottom] 30 | ItemHeight = 13 31 | TabOrder = 0 32 | end 33 | object btnReceive: TButton 34 | Left = 8 35 | Top = 8 36 | Width = 75 37 | Height = 25 38 | Caption = 'ReceiveWait' 39 | TabOrder = 1 40 | OnClick = btnReceiveClick 41 | end 42 | object btnSendWait: TButton 43 | Left = 8 44 | Top = 39 45 | Width = 75 46 | Height = 25 47 | Caption = 'SendWait' 48 | TabOrder = 2 49 | OnClick = btnSendWaitClick 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /tests/15_TaskGroup/test_15_TaskGroup.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTaskGroup: TfrmTestTaskGroup 2 | Left = 0 3 | Top = 0 4 | Caption = 'TaskGroup tester' 5 | ClientHeight = 306 6 | ClientWidth = 611 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 143 18 | Top = 0 19 | Width = 468 20 | Height = 306 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartTasks: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 129 30 | Height = 25 31 | Caption = 'Start tasks' 32 | TabOrder = 1 33 | OnClick = btnStartTasksClick 34 | end 35 | object btnStopTasks: TButton 36 | Left = 8 37 | Top = 39 38 | Width = 129 39 | Height = 25 40 | Caption = 'Stop tasks' 41 | TabOrder = 2 42 | OnClick = btnStopTasksClick 43 | end 44 | object OmniTED: TOmniEventMonitor 45 | OnTaskMessage = OmniTEDTaskMessage 46 | OnTaskTerminated = OmniTEDTaskTerminated 47 | Left = 8 48 | Top = 264 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /tests/24_ConnectionPool/test_24_ConnectionPool.dfm: -------------------------------------------------------------------------------- 1 | object frmConnectionPoolDemo: TfrmConnectionPoolDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Connection pool demo' 5 | ClientHeight = 359 6 | ClientWidth = 563 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnClose = FormClose 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object lbLog: TListBox 19 | Left = 111 20 | Top = 0 21 | Width = 452 22 | Height = 359 23 | Align = alRight 24 | ItemHeight = 13 25 | TabOrder = 0 26 | end 27 | object btnSchedule: TButton 28 | Left = 8 29 | Top = 8 30 | Width = 97 31 | Height = 25 32 | Caption = 'Schedule' 33 | TabOrder = 1 34 | OnClick = btnScheduleClick 35 | end 36 | object btnScheduleAndWait: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 97 40 | Height = 25 41 | Caption = 'Schedule and wait' 42 | TabOrder = 2 43 | OnClick = btnScheduleAndWaitClick 44 | end 45 | object OTLMonitor: TOmniEventMonitor 46 | OnTaskTerminated = OTLMonitorTaskTerminated 47 | Left = 72 48 | Top = 64 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /tests/43_InvokeAnonymous/test_43_InvokeAnonymous.dfm: -------------------------------------------------------------------------------- 1 | object frmInvokeAnonymousDemo: TfrmInvokeAnonymousDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Invoke(anonymous) demo' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object lbLog: TListBox 19 | Left = 119 20 | Top = 0 21 | Width = 516 22 | Height = 337 23 | Align = alRight 24 | ItemHeight = 13 25 | TabOrder = 0 26 | end 27 | object btnInvoke: TButton 28 | Left = 8 29 | Top = 8 30 | Width = 105 31 | Height = 25 32 | Caption = 'Invoke' 33 | TabOrder = 1 34 | OnClick = btnInvokeClick 35 | end 36 | object btnInvokeMonitored: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 105 40 | Height = 25 41 | Caption = 'Invoke Monitored' 42 | TabOrder = 2 43 | OnClick = btnInvokeClick 44 | end 45 | object OmniEventMonitor1: TOmniEventMonitor 46 | OnTaskMessage = OmniEventMonitor1TaskMessage 47 | Left = 8 48 | Top = 72 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /examples/report generator/reportGenerator1.dfm: -------------------------------------------------------------------------------- 1 | object frmReportGenerator: TfrmReportGenerator 2 | Left = 0 3 | Top = 0 4 | Caption = 'Report Generator' 5 | ClientHeight = 337 6 | ClientWidth = 710 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCloseQuery = FormCloseQuery 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object btnStart: TButton 18 | Left = 8 19 | Top = 8 20 | Width = 75 21 | Height = 25 22 | Caption = 'Start' 23 | TabOrder = 0 24 | OnClick = btnStartClick 25 | end 26 | object lbLog: TListBox 27 | Left = 89 28 | Top = 0 29 | Width = 621 30 | Height = 337 31 | Align = alRight 32 | Anchors = [akLeft, akTop, akRight, akBottom] 33 | ItemHeight = 13 34 | TabOrder = 1 35 | end 36 | object btnStop: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 75 40 | Height = 25 41 | Caption = 'Stop' 42 | Enabled = False 43 | TabOrder = 2 44 | OnClick = btnStopClick 45 | end 46 | object SimulatorTimer: TTimer 47 | Enabled = False 48 | OnTimer = SimulatorTimerTimer 49 | Left = 24 50 | Top = 288 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /tests/22_TerminationTest/test_22_TerminationTest.dfm: -------------------------------------------------------------------------------- 1 | object frmTerminationDemo: TfrmTerminationDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Termination test' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 89 18 | Top = 0 19 | Width = 337 20 | Height = 286 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStop: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 75 30 | Height = 25 31 | Caption = 'Stop' 32 | TabOrder = 1 33 | OnClick = btnStopClick 34 | end 35 | object btnTerminate: TButton 36 | Left = 8 37 | Top = 40 38 | Width = 75 39 | Height = 25 40 | Caption = 'Terminate' 41 | TabOrder = 2 42 | OnClick = btnTerminateClick 43 | end 44 | object OTLMonitor: TOmniEventMonitor 45 | OnTaskMessage = OTLMonitorTaskMessage 46 | OnTaskTerminated = OTLMonitorTaskTerminated 47 | Left = 24 48 | Top = 232 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /unittests/TestValue.pas: -------------------------------------------------------------------------------- 1 | unit TestValue; 2 | 3 | interface 4 | 5 | uses 6 | GpStuff; 7 | 8 | var 9 | GTestValueCount: integer; 10 | 11 | type 12 | ITestValue = interface(IGpTraceable) ['{48E54332-2E07-47F5-A6AE-63CF75168CA6}'] 13 | function GetValue: integer; 14 | procedure SetValue(const value: integer); 15 | property Value: integer read GetValue write SetValue; 16 | end; 17 | 18 | TTestValue = class(TGpTraceable, ITestValue) 19 | strict private 20 | FValue: integer; 21 | protected 22 | function GetValue: integer; 23 | procedure SetValue(const value: integer); 24 | public 25 | constructor Create(val: integer); 26 | destructor Destroy; override; 27 | property Value: integer read GetValue write SetValue; 28 | end; 29 | 30 | implementation 31 | 32 | { TTestValue } 33 | 34 | constructor TTestValue.Create(val: integer); 35 | begin 36 | inherited Create; 37 | FValue := val; 38 | Inc(GTestValueCount); 39 | end; 40 | 41 | destructor TTestValue.Destroy; 42 | begin 43 | Dec(GTestValueCount); 44 | inherited; 45 | end; 46 | 47 | function TTestValue.GetValue: integer; 48 | begin 49 | Result := FValue; 50 | end; 51 | 52 | procedure TTestValue.SetValue(const value: integer); 53 | begin 54 | FValue := value; 55 | end; 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /tests/50_OmniValueArray/test_50_OmniValueArray.dfm: -------------------------------------------------------------------------------- 1 | object frmOmniValueArray: TfrmOmniValueArray 2 | Left = 0 3 | Top = 0 4 | Caption = 'OmniValueArray demo' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object lbLog: TListBox 19 | Left = 120 20 | Top = 0 21 | Width = 515 22 | Height = 337 23 | Align = alRight 24 | Anchors = [akLeft, akTop, akRight, akBottom] 25 | ItemHeight = 13 26 | TabOrder = 0 27 | end 28 | object btnSendHash: TButton 29 | Left = 8 30 | Top = 8 31 | Width = 106 32 | Height = 25 33 | Caption = 'Send Hash' 34 | TabOrder = 1 35 | OnClick = btnSendHashClick 36 | end 37 | object btnSendArray: TButton 38 | Left = 8 39 | Top = 40 40 | Width = 106 41 | Height = 25 42 | Caption = 'Send Array' 43 | TabOrder = 2 44 | OnClick = btnSendArrayClick 45 | end 46 | object btnSendRecord: TButton 47 | Left = 8 48 | Top = 72 49 | Width = 106 50 | Height = 25 51 | Caption = 'Send Record' 52 | TabOrder = 3 53 | OnClick = btnSendRecordClick 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /tests/17_MsgWait/test_17_MsgWait.dfm: -------------------------------------------------------------------------------- 1 | object frmTestMsgWait: TfrmTestMsgWait 2 | Left = 0 3 | Top = 0 4 | Caption = 'MsgWait tester' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnStart: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 90 20 | Height = 25 21 | Action = actStart 22 | TabOrder = 0 23 | end 24 | object lbLog: TListBox 25 | Left = 104 26 | Top = 0 27 | Width = 322 28 | Height = 286 29 | Align = alRight 30 | ItemHeight = 13 31 | TabOrder = 1 32 | end 33 | object btnStop: TButton 34 | Left = 8 35 | Top = 39 36 | Width = 90 37 | Height = 25 38 | Action = actStop 39 | TabOrder = 2 40 | end 41 | object ActionList: TActionList 42 | Left = 8 43 | Top = 248 44 | object actStart: TAction 45 | Caption = 'Start' 46 | OnExecute = actStartExecute 47 | OnUpdate = actStartUpdate 48 | end 49 | object actStop: TAction 50 | Caption = 'Stop' 51 | OnExecute = actStopExecute 52 | OnUpdate = actStopUpdate 53 | end 54 | end 55 | object oeMonitor: TOmniEventMonitor 56 | OnTaskMessage = oeMonitorTaskMessage 57 | Left = 48 58 | Top = 248 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /examples/checkVat/checkVat1.dfm: -------------------------------------------------------------------------------- 1 | object frmCheckVat: TfrmCheckVat 2 | Left = 0 3 | Top = 0 4 | Caption = 'Check VAT' 5 | ClientHeight = 243 6 | ClientWidth = 340 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | DesignSize = ( 15 | 340 16 | 243) 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object inpCC: TLabeledEdit 20 | Left = 16 21 | Top = 32 22 | Width = 73 23 | Height = 21 24 | EditLabel.Width = 67 25 | EditLabel.Height = 13 26 | EditLabel.Caption = 'Country Code' 27 | TabOrder = 0 28 | Text = 'SI' 29 | end 30 | object inpVAT: TLabeledEdit 31 | Left = 104 32 | Top = 32 33 | Width = 129 34 | Height = 21 35 | Anchors = [akLeft, akTop, akRight] 36 | EditLabel.Width = 19 37 | EditLabel.Height = 13 38 | EditLabel.Caption = 'VAT' 39 | TabOrder = 1 40 | Text = '52075800' 41 | end 42 | object btnCheckVat: TButton 43 | Left = 247 44 | Top = 30 45 | Width = 75 46 | Height = 25 47 | Anchors = [akTop, akRight] 48 | Caption = 'Check VAT' 49 | TabOrder = 2 50 | OnClick = btnCheckVatClick 51 | end 52 | object outVatInfo: TMemo 53 | Left = 16 54 | Top = 72 55 | Width = 306 56 | Height = 153 57 | Anchors = [akLeft, akTop, akRight, akBottom] 58 | TabOrder = 3 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /bag of stuff/release-1.0.txt: -------------------------------------------------------------------------------- 1 | OmniThreadLibrary is simple to use threading library for Delphi. It's 2 | main "selling" points (besides the price, of course are power, 3 | simplicity, and openess. With just few lines of code, you can set up 4 | multiple threads, send messages between them, process Windows messages 5 | and more. OmniThreadLibrary doesn't limit you in any way - if it is not 6 | powerfull enough for you, you can ignore any part of its "smartness" 7 | and replace it with your own code. 8 | 9 | OmniThreadLibrary is an open source project. It lives in the Google 10 | Code and is licensed under the BSD license. 11 | OmniThreadLibrary 1.0 is available via SVN 12 | (http://omnithreadlibrary.googlecode.com/svn/tags/release-1.0) or as a 13 | ZIP archive 14 | (http://omnithreadlibrary.googlecode.com/files/OmniThreadLibrary-1.0.zip). 15 | 16 | At the moment, OmniThreadLibrary supports Delphi 2007 on the Win32 17 | platform. It will support Delphi 2009 as soon as it's available. 18 | Currently, there are no plans to support older Delphi compilers and 19 | .NET. 20 | 21 | Home page: http://otl.17slon.com/ 22 | Web discussion forum: http://otl.17slon.com/forum/ 23 | Downloads: http://code.google.com/p/omnithreadlibrary/downloads/list 24 | Issue tracker: http://code.google.com/p/omnithreadlibrary/issues/list 25 | SVN checkout instructions: 26 | http://code.google.com/p/omnithreadlibrary/source/checkout 27 | Author's blog: http://thedelphigeek.com 28 | Author's home page: http://gp.17slon.com 29 | 30 | -- 31 | Primoz 32 | [http://thedelphigeek.com] -------------------------------------------------------------------------------- /tests/12_Lock/test_12_Lock.dfm: -------------------------------------------------------------------------------- 1 | object frmTestLock: TfrmTestLock 2 | Left = 0 3 | Top = 0 4 | Caption = 'Lock tester' 5 | ClientHeight = 306 6 | ClientWidth = 611 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 143 18 | Top = 0 19 | Width = 468 20 | Height = 306 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnNoLock: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 129 30 | Height = 25 31 | Caption = 'No lock' 32 | TabOrder = 1 33 | OnClick = btnNoLockClick 34 | end 35 | object btnLock: TButton 36 | Left = 8 37 | Top = 39 38 | Width = 129 39 | Height = 25 40 | Caption = 'Lock' 41 | TabOrder = 2 42 | OnClick = btnNoLockClick 43 | end 44 | object btnTestLock: TButton 45 | Left = 8 46 | Top = 117 47 | Width = 129 48 | Height = 25 49 | Caption = 'Test lock' 50 | TabOrder = 3 51 | OnClick = btnTestLockClick 52 | end 53 | object btnTestNoLock: TButton 54 | Left = 8 55 | Top = 86 56 | Width = 129 57 | Height = 25 58 | Caption = 'Test no lock' 59 | TabOrder = 4 60 | OnClick = btnTestLockClick 61 | end 62 | object OmniTED: TOmniEventMonitor 63 | Left = 8 64 | Top = 264 65 | end 66 | end 67 | -------------------------------------------------------------------------------- /tests/34_TreeScan/test_34_TreeScan.dfm: -------------------------------------------------------------------------------- 1 | object frmTreeScanDemo: TfrmTreeScanDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Tree scan demo' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCloseQuery = FormCloseQuery 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 111 19 | Top = 0 20 | Width = 524 21 | Height = 337 22 | Align = alRight 23 | Anchors = [akLeft, akTop, akRight, akBottom] 24 | ItemHeight = 13 25 | TabOrder = 0 26 | end 27 | object btnBuildTree: TButton 28 | Left = 8 29 | Top = 8 30 | Width = 97 31 | Height = 25 32 | Caption = 'Build tree' 33 | TabOrder = 1 34 | OnClick = btnBuildTreeClick 35 | end 36 | object btnSeqScan: TButton 37 | Left = 8 38 | Top = 72 39 | Width = 97 40 | Height = 25 41 | Caption = 'Sequential scan' 42 | Enabled = False 43 | TabOrder = 2 44 | OnClick = btnSeqScanClick 45 | end 46 | object btnParaScan: TButton 47 | Left = 8 48 | Top = 104 49 | Width = 97 50 | Height = 25 51 | Caption = 'Parallel scan' 52 | Enabled = False 53 | TabOrder = 3 54 | OnClick = btnParaScanClick 55 | end 56 | object btnBuildLarge: TButton 57 | Left = 8 58 | Top = 40 59 | Width = 97 60 | Height = 25 61 | Caption = 'Build large tree' 62 | TabOrder = 4 63 | OnClick = btnBuildLargeClick 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntime2009.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntime2009; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 26 | {$RUNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vclx, 32 | vcl; 33 | 34 | contains 35 | GpLists in '..\src\GpLists.pas', 36 | GpStuff in '..\src\GpStuff.pas', 37 | GpStringHash in '..\src\GpStringHash.pas', 38 | DetailedRTTI in '..\src\DetailedRTTI.pas', 39 | OtlCommon in '..\OtlCommon.pas', 40 | OtlContainers in '..\OtlContainers.pas', 41 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 42 | OtlComm in '..\OtlComm.pas', 43 | OtlTask in '..\OtlTask.pas', 44 | OtlTaskControl in '..\OtlTaskControl.pas', 45 | OtlThreadPool in '..\OtlThreadPool.pas', 46 | OtlEventMonitor in '..\OtlEventMonitor.pas', 47 | DSiWin32 in '..\src\DSiWin32.pas', 48 | OtlContainerObserver in '..\OtlContainerObserver.pas', 49 | OtlSync in '..\OtlSync.pas', 50 | OtlHooks in '..\OtlHooks.pas', 51 | OtlCollections in '..\OtlCollections.pas', 52 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 53 | OtlDataManager in '..\OtlDataManager.pas', 54 | OtlParallel in '..\OtlParallel.pas'; 55 | 56 | end. -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntime2010.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntime2010; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 26 | {$RUNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vclx, 32 | vcl; 33 | 34 | contains 35 | GpLists in '..\src\GpLists.pas', 36 | GpStuff in '..\src\GpStuff.pas', 37 | GpStringHash in '..\src\GpStringHash.pas', 38 | DetailedRTTI in '..\src\DetailedRTTI.pas', 39 | OtlCommon in '..\OtlCommon.pas', 40 | OtlContainers in '..\OtlContainers.pas', 41 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 42 | OtlComm in '..\OtlComm.pas', 43 | OtlTask in '..\OtlTask.pas', 44 | OtlTaskControl in '..\OtlTaskControl.pas', 45 | OtlThreadPool in '..\OtlThreadPool.pas', 46 | OtlEventMonitor in '..\OtlEventMonitor.pas', 47 | DSiWin32 in '..\src\DSiWin32.pas', 48 | OtlContainerObserver in '..\OtlContainerObserver.pas', 49 | OtlSync in '..\OtlSync.pas', 50 | OtlHooks in '..\OtlHooks.pas', 51 | OtlCollections in '..\OtlCollections.pas', 52 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 53 | OtlDataManager in '..\OtlDataManager.pas', 54 | OtlParallel in '..\OtlParallel.pas'; 55 | 56 | end. -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntimeXE; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 26 | {$RUNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vclx, 32 | vcl; 33 | 34 | contains 35 | GpLists in '..\src\GpLists.pas', 36 | GpStuff in '..\src\GpStuff.pas', 37 | GpStringHash in '..\src\GpStringHash.pas', 38 | DetailedRTTI in '..\src\DetailedRTTI.pas', 39 | OtlCommon in '..\OtlCommon.pas', 40 | OtlContainers in '..\OtlContainers.pas', 41 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 42 | OtlComm in '..\OtlComm.pas', 43 | OtlTask in '..\OtlTask.pas', 44 | OtlTaskControl in '..\OtlTaskControl.pas', 45 | OtlThreadPool in '..\OtlThreadPool.pas', 46 | OtlEventMonitor in '..\OtlEventMonitor.pas', 47 | DSiWin32 in '..\src\DSiWin32.pas', 48 | OtlContainerObserver in '..\OtlContainerObserver.pas', 49 | OtlSync in '..\OtlSync.pas', 50 | OtlHooks in '..\OtlHooks.pas', 51 | OtlCollections in '..\OtlCollections.pas', 52 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 53 | OtlDataManager in '..\OtlDataManager.pas', 54 | OtlParallel in '..\OtlParallel.pas'; 55 | 56 | end. 57 | -------------------------------------------------------------------------------- /tests/31_WaitableObjects/test_31_WaitableObjects.dfm: -------------------------------------------------------------------------------- 1 | object frmTestWaitableObjects: TfrmTestWaitableObjects 2 | Left = 0 3 | Top = 0 4 | Caption = 'Waitable Objects demo' 5 | ClientHeight = 343 6 | ClientWidth = 582 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCloseQuery = FormCloseQuery 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object btnSignal1: TButton 19 | Left = 8 20 | Top = 8 21 | Width = 105 22 | Height = 25 23 | Caption = 'Signal event 1' 24 | TabOrder = 0 25 | OnClick = btnSignal1Click 26 | end 27 | object btnSignal2: TButton 28 | Left = 8 29 | Top = 39 30 | Width = 105 31 | Height = 25 32 | Caption = 'Signal event 2' 33 | TabOrder = 1 34 | OnClick = btnSignal2Click 35 | end 36 | object lbLog: TListBox 37 | Left = 119 38 | Top = 0 39 | Width = 463 40 | Height = 343 41 | Align = alRight 42 | Anchors = [akLeft, akTop, akRight, akBottom] 43 | ItemHeight = 13 44 | TabOrder = 2 45 | end 46 | object btnUnregister1: TButton 47 | Left = 8 48 | Top = 96 49 | Width = 105 50 | Height = 25 51 | Caption = 'Unregister event 1' 52 | TabOrder = 3 53 | OnClick = btnUnregister1Click 54 | end 55 | object btnRegister1: TButton 56 | Left = 8 57 | Top = 127 58 | Width = 105 59 | Height = 25 60 | Caption = 'Register event 1' 61 | TabOrder = 4 62 | OnClick = btnRegister1Click 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntime.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntime; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS ON} 16 | {$RANGECHECKS ON} 17 | {$REFERENCEINFO ON} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 26 | {$RUNONLY} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | vclx, 32 | vcl; 33 | 34 | contains 35 | GpLists in '..\src\GpLists.pas', 36 | GpStuff in '..\src\GpStuff.pas', 37 | HVStringBuilder in '..\src\HVStringBuilder.pas', 38 | HVStringData in '..\src\HVStringData.pas', 39 | GpStringHash in '..\src\GpStringHash.pas', 40 | DetailedRTTI in '..\src\DetailedRTTI.pas', 41 | OtlCommon in '..\OtlCommon.pas', 42 | OtlContainers in '..\OtlContainers.pas', 43 | OtlContainerObserver in '..\OtlContainerObserver.pas', 44 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 45 | OtlComm in '..\OtlComm.pas', 46 | OtlTask in '..\OtlTask.pas', 47 | OtlTaskControl in '..\OtlTaskControl.pas', 48 | OtlThreadPool in '..\OtlThreadPool.pas', 49 | OtlEventMonitor in '..\OtlEventMonitor.pas', 50 | DSiWin32 in '..\src\DSiWin32.pas', 51 | OtlSync in '..\OtlSync.pas', 52 | OtlHooks in '..\OtlHooks.pas', 53 | OtlCollections in '..\OtlCollections.pas', 54 | OtlCommon.Utils in '..\OtlCommon.Utils.pas'; 55 | 56 | end. 57 | -------------------------------------------------------------------------------- /tests/30_AnonymousEventMonitor/test_30_AnonymousEventMonitor.pas: -------------------------------------------------------------------------------- 1 | unit test_30_AnonymousEventMonitor; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, 8 | OtlCommon, 9 | OtlComm, 10 | OtlTask, 11 | OtlTaskControl, 12 | OtlEventMonitor; 13 | 14 | type 15 | TfrmAnonymousEventMonitorDemo = class(TForm) 16 | lbLog: TListBox; 17 | btnHello: TButton; 18 | procedure btnHelloClick(Sender: TObject); 19 | private 20 | FAnonTask: IOmniTaskControl; 21 | public 22 | { Public declarations } 23 | end; 24 | 25 | var 26 | frmAnonymousEventMonitorDemo: TfrmAnonymousEventMonitorDemo; 27 | 28 | implementation 29 | 30 | {$R *.dfm} 31 | 32 | procedure TfrmAnonymousEventMonitorDemo.btnHelloClick(Sender: TObject); 33 | begin 34 | btnHello.Enabled := false; 35 | FAnonTask := CreateTask( 36 | procedure (const task: IOmniTask) begin 37 | task.Comm.Send(0, Format('Hello, world! Reporting from thread %d', 38 | [GetCurrentThreadID])); 39 | end, 40 | 'HelloWorld') 41 | .OnMessage( 42 | procedure(const task: IOmniTaskControl; const msg: TOmniMessage) begin 43 | lbLog.ItemIndex := lbLog.Items.Add(Format('%d:[%d/%s] %d|%s', 44 | [GetCurrentThreadID, task.UniqueID, task.Name, msg.msgID, 45 | msg.msgData.AsString])); 46 | end) 47 | .OnTerminated( 48 | procedure(const task: IOmniTaskControl) begin 49 | lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] Terminated', 50 | [task.UniqueID, task.Name])); 51 | btnHello.Enabled := true; 52 | FAnonTask := nil; 53 | end) 54 | .Run; 55 | end; 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /tests/37_ParallelJoin/test_37_ParallelJoin.dfm: -------------------------------------------------------------------------------- 1 | object frmTestParallelJoin: TfrmTestParallelJoin 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel.Join demo' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnJoinAll: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 105 20 | Height = 25 21 | Caption = 'Join (all cores)' 22 | TabOrder = 0 23 | OnClick = btnJoinAllClick 24 | end 25 | object btnJoinOne: TButton 26 | Left = 8 27 | Top = 40 28 | Width = 105 29 | Height = 25 30 | Caption = 'Join (one core)' 31 | TabOrder = 1 32 | OnClick = btnJoinAllClick 33 | end 34 | object lbLog: TListBox 35 | Left = 119 36 | Top = 0 37 | Width = 516 38 | Height = 337 39 | Align = alRight 40 | Anchors = [akLeft, akTop, akRight, akBottom] 41 | ItemHeight = 13 42 | TabOrder = 2 43 | end 44 | object btnJoinTProc: TButton 45 | Left = 8 46 | Top = 88 47 | Width = 105 48 | Height = 25 49 | Caption = 'Join (TProc)' 50 | TabOrder = 3 51 | OnClick = btnJoinTProcClick 52 | end 53 | object btnCancel: TButton 54 | Left = 8 55 | Top = 136 56 | Width = 105 57 | Height = 25 58 | Caption = 'Cancel' 59 | TabOrder = 4 60 | OnClick = btnCancelClick 61 | end 62 | object btnNoWait: TButton 63 | Left = 8 64 | Top = 183 65 | Width = 105 66 | Height = 25 67 | Caption = 'NoWait' 68 | TabOrder = 5 69 | OnClick = btnNoWaitClick 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE2.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntimeXE2; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS OFF} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE RELEASE} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 29 | {$RUNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vclx, 35 | vcl; 36 | 37 | contains 38 | GpLists in '..\src\GpLists.pas', 39 | GpStuff in '..\src\GpStuff.pas', 40 | GpStringHash in '..\src\GpStringHash.pas', 41 | DetailedRTTI in '..\src\DetailedRTTI.pas', 42 | OtlCommon in '..\OtlCommon.pas', 43 | OtlContainers in '..\OtlContainers.pas', 44 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 45 | OtlComm in '..\OtlComm.pas', 46 | OtlTask in '..\OtlTask.pas', 47 | OtlTaskControl in '..\OtlTaskControl.pas', 48 | OtlThreadPool in '..\OtlThreadPool.pas', 49 | OtlEventMonitor in '..\OtlEventMonitor.pas', 50 | DSiWin32 in '..\src\DSiWin32.pas', 51 | OtlContainerObserver in '..\OtlContainerObserver.pas', 52 | OtlSync in '..\OtlSync.pas', 53 | OtlHooks in '..\OtlHooks.pas', 54 | OtlCollections in '..\OtlCollections.pas', 55 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 56 | OtlDataManager in '..\OtlDataManager.pas', 57 | OtlParallel in '..\OtlParallel.pas'; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE3.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntimeXE3; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS OFF} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE RELEASE} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 29 | {$RUNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vclx, 35 | vcl; 36 | 37 | contains 38 | GpLists in '..\src\GpLists.pas', 39 | GpStuff in '..\src\GpStuff.pas', 40 | GpStringHash in '..\src\GpStringHash.pas', 41 | DetailedRTTI in '..\src\DetailedRTTI.pas', 42 | OtlCommon in '..\OtlCommon.pas', 43 | OtlContainers in '..\OtlContainers.pas', 44 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 45 | OtlComm in '..\OtlComm.pas', 46 | OtlTask in '..\OtlTask.pas', 47 | OtlTaskControl in '..\OtlTaskControl.pas', 48 | OtlThreadPool in '..\OtlThreadPool.pas', 49 | OtlEventMonitor in '..\OtlEventMonitor.pas', 50 | DSiWin32 in '..\src\DSiWin32.pas', 51 | OtlContainerObserver in '..\OtlContainerObserver.pas', 52 | OtlSync in '..\OtlSync.pas', 53 | OtlHooks in '..\OtlHooks.pas', 54 | OtlCollections in '..\OtlCollections.pas', 55 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 56 | OtlDataManager in '..\OtlDataManager.pas', 57 | OtlParallel in '..\OtlParallel.pas'; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE4.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntimeXE4; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS OFF} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE RELEASE} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 29 | {$RUNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vclx, 35 | vcl; 36 | 37 | contains 38 | GpLists in '..\src\GpLists.pas', 39 | GpStuff in '..\src\GpStuff.pas', 40 | GpStringHash in '..\src\GpStringHash.pas', 41 | DetailedRTTI in '..\src\DetailedRTTI.pas', 42 | OtlCommon in '..\OtlCommon.pas', 43 | OtlContainers in '..\OtlContainers.pas', 44 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 45 | OtlComm in '..\OtlComm.pas', 46 | OtlTask in '..\OtlTask.pas', 47 | OtlTaskControl in '..\OtlTaskControl.pas', 48 | OtlThreadPool in '..\OtlThreadPool.pas', 49 | OtlEventMonitor in '..\OtlEventMonitor.pas', 50 | DSiWin32 in '..\src\DSiWin32.pas', 51 | OtlContainerObserver in '..\OtlContainerObserver.pas', 52 | OtlSync in '..\OtlSync.pas', 53 | OtlHooks in '..\OtlHooks.pas', 54 | OtlCollections in '..\OtlCollections.pas', 55 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 56 | OtlDataManager in '..\OtlDataManager.pas', 57 | OtlParallel in '..\OtlParallel.pas'; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryRuntimeXE5.dpk: -------------------------------------------------------------------------------- 1 | package OmniThreadLibraryRuntimeXE5; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS OFF} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION ON} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO OFF} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES OFF} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE RELEASE} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'OmniThreadLibrary runtime'} 29 | {$RUNONLY} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | vclx, 35 | vcl; 36 | 37 | contains 38 | GpLists in '..\src\GpLists.pas', 39 | GpStuff in '..\src\GpStuff.pas', 40 | GpStringHash in '..\src\GpStringHash.pas', 41 | DetailedRTTI in '..\src\DetailedRTTI.pas', 42 | OtlCommon in '..\OtlCommon.pas', 43 | OtlContainers in '..\OtlContainers.pas', 44 | OtlCommBufferTest in '..\OtlCommBufferTest.pas', 45 | OtlComm in '..\OtlComm.pas', 46 | OtlTask in '..\OtlTask.pas', 47 | OtlTaskControl in '..\OtlTaskControl.pas', 48 | OtlThreadPool in '..\OtlThreadPool.pas', 49 | OtlEventMonitor in '..\OtlEventMonitor.pas', 50 | DSiWin32 in '..\src\DSiWin32.pas', 51 | OtlContainerObserver in '..\OtlContainerObserver.pas', 52 | OtlSync in '..\OtlSync.pas', 53 | OtlHooks in '..\OtlHooks.pas', 54 | OtlCollections in '..\OtlCollections.pas', 55 | OtlCommon.Utils in '..\OtlCommon.Utils.pas', 56 | OtlDataManager in '..\OtlDataManager.pas', 57 | OtlParallel in '..\OtlParallel.pas'; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /tests/29_ImplicitEventMonitor/test_29_TwoWayHello.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTwoWayHello: TfrmTestTwoWayHello 2 | Left = 0 3 | Top = 0 4 | Caption = 'Two way hello' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 104 18 | Top = 0 19 | Width = 322 20 | Height = 286 21 | Align = alRight 22 | ItemHeight = 13 23 | TabOrder = 0 24 | end 25 | object btnStartHello: TButton 26 | Left = 8 27 | Top = 8 28 | Width = 90 29 | Height = 25 30 | Action = actStartHello 31 | TabOrder = 1 32 | end 33 | object btnStopHello: TButton 34 | Left = 8 35 | Top = 70 36 | Width = 90 37 | Height = 25 38 | Action = actStopHello 39 | TabOrder = 2 40 | end 41 | object btnChangeMessage: TButton 42 | Left = 8 43 | Top = 39 44 | Width = 90 45 | Height = 25 46 | Action = actChangeMessage 47 | TabOrder = 3 48 | end 49 | object ActionList: TActionList 50 | Left = 8 51 | Top = 248 52 | object actStartHello: TAction 53 | Caption = 'Start "Hello"' 54 | OnExecute = actStartHelloExecute 55 | OnUpdate = actStartHelloUpdate 56 | end 57 | object actStopHello: TAction 58 | Caption = 'Stop "Hello"' 59 | OnExecute = actStopHelloExecute 60 | OnUpdate = actStopHelloUpdate 61 | end 62 | object actChangeMessage: TAction 63 | Caption = 'Change message' 64 | OnExecute = actChangeMessageExecute 65 | OnUpdate = actChangeMessageUpdate 66 | end 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /tests/02_TwoWayHello/test_2_TwoWayHello.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTwoWayHello: TfrmTestTwoWayHello 2 | Left = 0 3 | Top = 0 4 | Caption = 'Two way hello' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 104 19 | Top = 0 20 | Width = 322 21 | Height = 286 22 | Align = alRight 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartHello: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 90 30 | Height = 25 31 | Action = actStartHello 32 | TabOrder = 1 33 | end 34 | object btnStopHello: TButton 35 | Left = 8 36 | Top = 70 37 | Width = 90 38 | Height = 25 39 | Action = actStopHello 40 | TabOrder = 2 41 | end 42 | object btnChangeMessage: TButton 43 | Left = 8 44 | Top = 39 45 | Width = 90 46 | Height = 25 47 | Action = actChangeMessage 48 | TabOrder = 3 49 | end 50 | object ActionList: TActionList 51 | Left = 8 52 | Top = 248 53 | object actStartHello: TAction 54 | Caption = 'Start "Hello"' 55 | OnExecute = actStartHelloExecute 56 | OnUpdate = actStartHelloUpdate 57 | end 58 | object actStopHello: TAction 59 | Caption = 'Stop "Hello"' 60 | OnExecute = actStopHelloExecute 61 | OnUpdate = actStopHelloUpdate 62 | end 63 | object actChangeMessage: TAction 64 | Caption = 'Change message' 65 | OnExecute = actChangeMessageExecute 66 | OnUpdate = actChangeMessageUpdate 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /tests/29_ImplicitEventMonitor/test_29_ImplicitEventMonitor.dfm: -------------------------------------------------------------------------------- 1 | object frmImplicitEventMonitor: TfrmImplicitEventMonitor 2 | Left = 0 3 | Top = 0 4 | Caption = 'Implicit event monitor' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 104 18 | Top = 0 19 | Width = 322 20 | Height = 286 21 | Align = alRight 22 | ItemHeight = 13 23 | TabOrder = 0 24 | end 25 | object btnStartHello: TButton 26 | Left = 8 27 | Top = 8 28 | Width = 90 29 | Height = 25 30 | Action = actStartHello 31 | TabOrder = 1 32 | end 33 | object btnStopHello: TButton 34 | Left = 8 35 | Top = 70 36 | Width = 90 37 | Height = 25 38 | Action = actStopHello 39 | TabOrder = 2 40 | end 41 | object btnChangeMessage: TButton 42 | Left = 8 43 | Top = 39 44 | Width = 90 45 | Height = 25 46 | Action = actChangeMessage 47 | TabOrder = 3 48 | end 49 | object ActionList: TActionList 50 | Left = 8 51 | Top = 248 52 | object actStartHello: TAction 53 | Caption = 'Start "Hello"' 54 | OnExecute = actStartHelloExecute 55 | OnUpdate = actStartHelloUpdate 56 | end 57 | object actStopHello: TAction 58 | Caption = 'Stop "Hello"' 59 | OnExecute = actStopHelloExecute 60 | OnUpdate = actStopHelloUpdate 61 | end 62 | object actChangeMessage: TAction 63 | Caption = 'Change message' 64 | OnExecute = actChangeMessageExecute 65 | OnUpdate = actChangeMessageUpdate 66 | end 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /tests/21_Anonymous_methods/test_21_Anonymous_methods.pas: -------------------------------------------------------------------------------- 1 | unit test_21_Anonymous_methods; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, 8 | OtlCommon, 9 | OtlComm, 10 | OtlTask, 11 | OtlTaskControl, 12 | OtlEventMonitor; 13 | 14 | type 15 | TfrmAnonymousMethodsDemo = class(TForm) 16 | lbLog: TListBox; 17 | btnHello: TButton; 18 | OTLMonitor: TOmniEventMonitor; 19 | procedure btnHelloClick(Sender: TObject); 20 | procedure OTLMonitorTaskMessage(const task: IOmniTaskControl; const msg: TOmniMessage); 21 | procedure OTLMonitorTaskTerminated(const task: IOmniTaskControl); 22 | private 23 | { Private declarations } 24 | public 25 | { Public declarations } 26 | end; 27 | 28 | var 29 | frmAnonymousMethodsDemo: TfrmAnonymousMethodsDemo; 30 | 31 | implementation 32 | 33 | {$R *.dfm} 34 | 35 | procedure TfrmAnonymousMethodsDemo.btnHelloClick(Sender: TObject); 36 | begin 37 | btnHello.Enabled := false; 38 | OTLMonitor.Monitor(CreateTask( 39 | procedure (const task: IOmniTask) begin 40 | task.Comm.Send(0, Format('Hello, world! Reporting from thread %d', [GetCurrentThreadID])); 41 | end, 42 | 'HelloWorld')).Run; 43 | end; 44 | 45 | procedure TfrmAnonymousMethodsDemo.OTLMonitorTaskMessage( 46 | const task: IOmniTaskControl; const msg: TOmniMessage); 47 | begin 48 | lbLog.ItemIndex := lbLog.Items.Add(Format('%d:[%d/%s] %d|%s', 49 | [GetCurrentThreadID, task.UniqueID, task.Name, msg.msgID, msg.msgData.AsString])); 50 | end; 51 | 52 | procedure TfrmAnonymousMethodsDemo.OTLMonitorTaskTerminated(const task: 53 | IOmniTaskControl); 54 | begin 55 | lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] Terminated', [task.UniqueID, task.Name])); 56 | btnHello.Enabled := true; 57 | end; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /examples/checkVat/checkVat1.pas: -------------------------------------------------------------------------------- 1 | unit checkVat1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, 8 | checkVatService, 9 | OtlParallel; 10 | 11 | type 12 | TfrmCheckVat = class(TForm) 13 | inpCC: TLabeledEdit; 14 | inpVAT: TLabeledEdit; 15 | btnCheckVat: TButton; 16 | outVatInfo: TMemo; 17 | procedure btnCheckVatClick(Sender: TObject); 18 | strict private 19 | FRequest: IOmniFuture; 20 | private 21 | public 22 | end; 23 | 24 | var 25 | frmCheckVat: TfrmCheckVat; 26 | 27 | implementation 28 | 29 | uses 30 | OleAuto, 31 | ActiveX, 32 | OtlTaskControl; 33 | 34 | {$R *.dfm} 35 | 36 | procedure TfrmCheckVat.btnCheckVatClick(Sender: TObject); 37 | begin 38 | btnCheckVat.Enabled := false; 39 | outVatInfo.Lines.Clear; 40 | FRequest := Parallel.Future( 41 | function: checkVatResponse 42 | var 43 | request: checkVat; 44 | begin 45 | OleCheck(CoInitializeEx(nil, COINIT_MULTITHREADED)); 46 | try 47 | request := checkVat.Create; 48 | try 49 | request.countryCode := Trim(inpCC.Text); 50 | request.vatNumber := Trim(inpVat.Text); 51 | Result := checkVatService.GetcheckVatPortType.checkVat(request); 52 | finally FreeAndNil(request); end; 53 | finally CoUninitialize; end; 54 | end, 55 | Parallel.TaskConfig.OnTerminated( 56 | procedure (const task: IOmniTaskControl) 57 | begin 58 | outVatInfo.Text := FRequest.Value.name_ + #13#10 + FRequest.Value.address; 59 | FRequest.Value.Free; 60 | FRequest := nil; 61 | btnCheckVat.Enabled := true; 62 | end 63 | ) 64 | ); 65 | end; 66 | 67 | end. 68 | -------------------------------------------------------------------------------- /bag of stuff/release-1.04b.txt: -------------------------------------------------------------------------------- 1 | OmniThreadLibrary 1.04b has just been released. It is available via 2 | SVN (http://omnithreadlibrary.googlecode.com/svn/tags/release-1.04b) or 3 | as a ZIP archive 4 | (http://code.google.com/p/omnithreadlibrary/downloads/list). 5 | 6 | What is OmniThreadLibrary? 7 | ========================== 8 | 9 | OmniThreadLibrary is simple to use threading library for Delphi. It's 10 | main "selling" points (besides the price, of course are power, 11 | simplicity, and openess. With just few lines of code, you can set up 12 | multiple threads, send messages between them, process Windows messages 13 | and more. OmniThreadLibrary doesn't limit you in any way - if it is not 14 | powerfull enough for you, you can ignore any part of its "smartness" 15 | and replace it with your own code. 16 | 17 | OmniThreadLibrary is an open source project. It lives in the Google 18 | Code and is licensed under the BSD license. 19 | 20 | At the moment, OmniThreadLibrary supports Delphi 2007, 2009, and 2010 21 | on the Win32 platform. Currently, there are no plans to support older 22 | Delphi compilers and .NET. 23 | 24 | Where can I get more imformation? 25 | ================================= 26 | 27 | Home page: http://otl.17slon.com/ 28 | Web discussion forum: http://otl.17slon.com/forum/ 29 | Downloads: http://code.google.com/p/omnithreadlibrary/downloads/list 30 | Issue tracker: http://code.google.com/p/omnithreadlibrary/issues/list 31 | SVN checkout instructions: 32 | http://code.google.com/p/omnithreadlibrary/source/checkout 33 | Author's blog: http://thedelphigeek.com 34 | Author's home page: http://gp.17slon.com 35 | 36 | Changes since version 1.04a 37 | =========================== 38 | 39 | - [ahwux, gabr] Fixed Delphi 2010 Update 4 compatibility. 40 | - [ahwux] Added missing task interface cleanup to OnTerminated in demo 18. 41 | 42 | -- 43 | Primoz 44 | [http://thedelphigeek.com] -------------------------------------------------------------------------------- /tests/52_BackgroundWorker/test_52_BackgroundWorker.dfm: -------------------------------------------------------------------------------- 1 | object Form16: TForm16 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form16' 5 | ClientHeight = 243 6 | ClientWidth = 527 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object btnWork: TButton 18 | Left = 8 19 | Top = 8 20 | Width = 75 21 | Height = 25 22 | Caption = 'Work!' 23 | TabOrder = 0 24 | OnClick = btnWorkClick 25 | end 26 | object lbLog: TListBox 27 | Left = 89 28 | Top = 0 29 | Width = 438 30 | Height = 243 31 | Align = alRight 32 | Anchors = [akLeft, akTop, akRight, akBottom] 33 | ItemHeight = 13 34 | TabOrder = 1 35 | end 36 | object btnWork3: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 75 40 | Height = 25 41 | Caption = 'Work x3!' 42 | TabOrder = 2 43 | OnClick = btnWork3Click 44 | end 45 | object btnException: TButton 46 | Left = 8 47 | Top = 70 48 | Width = 75 49 | Height = 25 50 | Caption = 'Exception' 51 | TabOrder = 3 52 | OnClick = btnExceptionClick 53 | end 54 | object btnCancel: TButton 55 | Left = 8 56 | Top = 101 57 | Width = 75 58 | Height = 25 59 | Caption = 'Cancel' 60 | TabOrder = 4 61 | OnClick = btnCancelClick 62 | end 63 | object btnCancelAll: TButton 64 | Left = 8 65 | Top = 132 66 | Width = 75 67 | Height = 25 68 | Caption = 'Cancel all' 69 | TabOrder = 5 70 | OnClick = btnCancelAllClick 71 | end 72 | object btnCancel2: TButton 73 | Left = 8 74 | Top = 163 75 | Width = 75 76 | Height = 25 77 | Caption = 'Cancel 2' 78 | TabOrder = 6 79 | OnClick = btnCancel2Click 80 | end 81 | end 82 | -------------------------------------------------------------------------------- /tests/47_TaskConfig/test_47_TaskConfig.dfm: -------------------------------------------------------------------------------- 1 | object frmDemoParallelTaskConfig: TfrmDemoParallelTaskConfig 2 | Left = 0 3 | Top = 0 4 | Caption = 'Parallel.TaskConfig tester' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object btnAsync: TButton 17 | Left = 8 18 | Top = 10 19 | Width = 75 20 | Height = 25 21 | Caption = 'Async' 22 | TabOrder = 0 23 | OnClick = btnAsyncClick 24 | end 25 | object lbLog: TListBox 26 | Left = 89 27 | Top = 0 28 | Width = 546 29 | Height = 337 30 | Align = alRight 31 | Anchors = [akLeft, akTop, akRight, akBottom] 32 | ItemHeight = 13 33 | TabOrder = 1 34 | end 35 | object btnJoin: TButton 36 | Left = 8 37 | Top = 41 38 | Width = 75 39 | Height = 25 40 | Caption = 'Join' 41 | TabOrder = 2 42 | OnClick = btnJoinClick 43 | end 44 | object btnFuture: TButton 45 | Left = 8 46 | Top = 72 47 | Width = 75 48 | Height = 25 49 | Caption = 'Future' 50 | TabOrder = 3 51 | OnClick = btnFutureClick 52 | end 53 | object btnPipeline: TButton 54 | Left = 8 55 | Top = 104 56 | Width = 75 57 | Height = 25 58 | Caption = 'Pipeline' 59 | TabOrder = 4 60 | OnClick = btnPipelineClick 61 | end 62 | object btnForEach: TButton 63 | Left = 8 64 | Top = 136 65 | Width = 75 66 | Height = 25 67 | Caption = 'ForEach' 68 | TabOrder = 5 69 | OnClick = btnForEachClick 70 | end 71 | object btnForkJoin: TButton 72 | Left = 8 73 | Top = 167 74 | Width = 75 75 | Height = 25 76 | Caption = 'ForkJoin' 77 | TabOrder = 6 78 | OnClick = btnForkJoinClick 79 | end 80 | end 81 | -------------------------------------------------------------------------------- /tests/03_HelloWorld_with_package/test_3_HelloWorld_with_package.pas: -------------------------------------------------------------------------------- 1 | unit test_3_HelloWorld_with_package; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 | StdCtrls, ActnList, 8 | OtlCommon, 9 | OtlTask, 10 | OtlTaskControl, 11 | OtlEventMonitor, 12 | OtlComm; 13 | 14 | type 15 | TfrmTestHelloWorld = class(TForm) 16 | btnHello : TButton; 17 | lbLog : TListBox; 18 | OmniEventMonitor1: TOmniEventMonitor; 19 | procedure btnHelloClick(Sender: TObject); 20 | procedure OmniEventMonitor1TaskMessage(const task: IOmniTaskControl; const msg: 21 | TOmniMessage); 22 | procedure OmniEventMonitor1TaskTerminated(const task: IOmniTaskControl); 23 | private 24 | procedure RunHelloWorld(const task: IOmniTask); 25 | end; 26 | 27 | var 28 | frmTestHelloWorld: TfrmTestHelloWorld; 29 | 30 | implementation 31 | 32 | uses 33 | DSiWin32; 34 | 35 | {$R *.dfm} 36 | 37 | { TfrmTestOTL } 38 | 39 | procedure TfrmTestHelloWorld.btnHelloClick(Sender: TObject); 40 | begin 41 | btnHello.Enabled := false; 42 | OmniEventMonitor1.Monitor(CreateTask(RunHelloWorld, 'HelloWorld')).Run; 43 | end; 44 | 45 | procedure TfrmTestHelloWorld.OmniEventMonitor1TaskMessage(const task: IOmniTaskControl; 46 | const msg: TOmniMessage); 47 | begin 48 | lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] %d|%s', 49 | [task.UniqueID, task.Name, msg.MsgID, msg.MsgData.AsString])); 50 | end; 51 | 52 | procedure TfrmTestHelloWorld.OmniEventMonitor1TaskTerminated(const task: IOmniTaskControl); 53 | begin 54 | lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] Terminated', [task.UniqueID, task.Name])); 55 | btnHello.Enabled := true; 56 | end; 57 | 58 | procedure TfrmTestHelloWorld.RunHelloWorld(const task: IOmniTask); 59 | begin 60 | //Executed in a background thread 61 | task.Comm.Send(0, 'Hello, world!'); 62 | end; 63 | 64 | initialization 65 | Randomize; 66 | end. 67 | -------------------------------------------------------------------------------- /unittests/TestBlockingCollection1.pas: -------------------------------------------------------------------------------- 1 | unit TestBlockingCollection1; 2 | { 3 | 4 | Delphi DUnit Test Case 5 | ---------------------- 6 | This unit contains a skeleton test case class generated by the Test Case Wizard. 7 | Modify the generated code to correctly setup and call the methods from the unit 8 | being tested. 9 | 10 | } 11 | 12 | interface 13 | 14 | uses 15 | TestFramework, GpStuff, Windows, DSiWin32, OtlContainers, SysUtils, 16 | OtlContainerObserver, OtlCollections, OtlCommon, OtlSync; 17 | 18 | type 19 | // Test methods for class IOmniBlockingCollection 20 | TestIOmniBlockingCollection = class(TTestCase) 21 | published 22 | procedure TestCompleteAdding; 23 | end; 24 | 25 | implementation 26 | 27 | uses 28 | OtlParallel; 29 | 30 | procedure TestIOmniBlockingCollection.TestCompleteAdding; 31 | var 32 | coll : IOmniBlockingCollection; 33 | iTest : integer; 34 | lastAdded: integer; 35 | lastRead : TOmniValue; 36 | begin 37 | for iTest := 1 to 1000 do begin 38 | coll := TOmniBlockingCollection.Create; 39 | lastAdded := -1; 40 | lastRead := -2; 41 | Parallel.Join([ 42 | procedure 43 | var 44 | i: integer; 45 | begin 46 | for i := 1 to 100000 do begin 47 | if not coll.TryAdd(i) then 48 | break; 49 | lastAdded := i; 50 | end; 51 | end, 52 | 53 | procedure 54 | begin 55 | Sleep(1); 56 | coll.CompleteAdding; 57 | end, 58 | 59 | procedure 60 | begin 61 | while coll.TryTake(lastRead, INFINITE) do 62 | ; 63 | end 64 | ]).Execute; 65 | if (lastAdded > 0) and (lastRead.AsInteger > 0) and (lastAdded <> lastRead.AsInteger) then 66 | break; //for iTest 67 | end; 68 | CheckEquals(lastAdded, lastRead.AsInteger); 69 | end; 70 | 71 | initialization 72 | // Register any test cases with the test runner 73 | RegisterTest(TestIOmniBlockingCollection.Suite); 74 | end. 75 | 76 | -------------------------------------------------------------------------------- /bag of stuff/release-1.04a.txt: -------------------------------------------------------------------------------- 1 | OmniThreadLibrary 1.04a has just been released. It is available via 2 | SVN (http://omnithreadlibrary.googlecode.com/svn/tags/release-1.04a) or 3 | as a ZIP archive 4 | (http://code.google.com/p/omnithreadlibrary/downloads/list). 5 | 6 | What is OmniThreadLibrary? 7 | ========================== 8 | 9 | OmniThreadLibrary is simple to use threading library for Delphi. It's 10 | main "selling" points (besides the price, of course are power, 11 | simplicity, and openess. With just few lines of code, you can set up 12 | multiple threads, send messages between them, process Windows messages 13 | and more. OmniThreadLibrary doesn't limit you in any way - if it is not 14 | powerfull enough for you, you can ignore any part of its "smartness" 15 | and replace it with your own code. 16 | 17 | OmniThreadLibrary is an open source project. It lives in the Google 18 | Code and is licensed under the BSD license. 19 | 20 | At the moment, OmniThreadLibrary supports Delphi 2007, 2009, and 2010 21 | on the Win32 platform. Currently, there are no plans to support older 22 | Delphi compilers and .NET. 23 | 24 | Where can I get more imformation? 25 | ================================= 26 | 27 | Home page: http://otl.17slon.com/ 28 | Web discussion forum: http://otl.17slon.com/forum/ 29 | Downloads: http://code.google.com/p/omnithreadlibrary/downloads/list 30 | Issue tracker: http://code.google.com/p/omnithreadlibrary/issues/list 31 | SVN checkout instructions: 32 | http://code.google.com/p/omnithreadlibrary/source/checkout 33 | Author's blog: http://thedelphigeek.com 34 | Author's home page: http://gp.17slon.com 35 | 36 | Changes since version 1.04 37 | ========================== 38 | 39 | - IMPORTANT: Fixed thread pool exception handling. 40 | - Implemented IOmniTask.RegisterWaitObject/UnregisterWaitObject. 41 | - Current versions of 3rd party units included. 42 | - Added demo 31_WaitableObjects: Demo for the new 43 | RegisterWaitObject/UnregisterWaitObject API. 44 | 45 | -- 46 | Primoz 47 | [http://thedelphigeek.com] 48 | -------------------------------------------------------------------------------- /tests/41_Pipeline/test_41_Pipeline.dfm: -------------------------------------------------------------------------------- 1 | object frmPipelineDemo: TfrmPipelineDemo 2 | Left = 0 3 | Top = 0 4 | Caption = 'Cascade/pipeline demo' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object lbLog: TListBox 17 | Left = 119 18 | Top = 0 19 | Width = 516 20 | Height = 337 21 | Align = alRight 22 | Anchors = [akLeft, akTop, akRight, akBottom] 23 | ItemHeight = 13 24 | TabOrder = 2 25 | end 26 | object btnExtended: TButton 27 | Left = 8 28 | Top = 39 29 | Width = 105 30 | Height = 25 31 | Caption = 'Extended Pipeline' 32 | TabOrder = 1 33 | OnClick = btnExtendedClick 34 | end 35 | object btnSimple: TButton 36 | Left = 8 37 | Top = 8 38 | Width = 105 39 | Height = 25 40 | Caption = 'Simple Pipeline' 41 | TabOrder = 0 42 | OnClick = btnSimpleClick 43 | end 44 | object btnExtended2: TButton 45 | Left = 8 46 | Top = 70 47 | Width = 105 48 | Height = 25 49 | Caption = 'Extended Pipeline 2' 50 | TabOrder = 3 51 | OnClick = btnExtended2Click 52 | end 53 | object btnStressTest: TButton 54 | Left = 8 55 | Top = 304 56 | Width = 105 57 | Height = 25 58 | Caption = 'Stress test' 59 | TabOrder = 4 60 | OnClick = btnStressTestClick 61 | end 62 | object btnCancelPipe: TButton 63 | Left = 8 64 | Top = 101 65 | Width = 105 66 | Height = 25 67 | Caption = 'Pipeline Cancelation' 68 | TabOrder = 5 69 | OnClick = btnCancelPipeClick 70 | end 71 | object btnCancelPipe2: TButton 72 | Left = 8 73 | Top = 132 74 | Width = 105 75 | Height = 25 76 | Caption = 'Pipeline Cancelation' 77 | TabOrder = 6 78 | OnClick = btnCancelPipeClick 79 | end 80 | end 81 | -------------------------------------------------------------------------------- /tests/05_TwoWayHello_without_loop/test_5_TwoWayHello_without_loop.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTwoWayHello: TfrmTestTwoWayHello 2 | Left = 0 3 | Top = 0 4 | Caption = 'Two way hello w/o loop' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnClose = FormClose 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 104 19 | Top = 0 20 | Width = 322 21 | Height = 286 22 | Align = alRight 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartHello: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 90 30 | Height = 25 31 | Action = actStartHello 32 | TabOrder = 1 33 | end 34 | object btnStopHello: TButton 35 | Left = 8 36 | Top = 70 37 | Width = 90 38 | Height = 25 39 | Action = actStopHello 40 | TabOrder = 2 41 | end 42 | object btnChangeMessage: TButton 43 | Left = 8 44 | Top = 39 45 | Width = 90 46 | Height = 25 47 | Action = actChangeMessage 48 | TabOrder = 3 49 | end 50 | object ActionList: TActionList 51 | Left = 8 52 | Top = 248 53 | object actStartHello: TAction 54 | Caption = 'Start "Hello"' 55 | OnExecute = actStartHelloExecute 56 | OnUpdate = actStartHelloUpdate 57 | end 58 | object actStopHello: TAction 59 | Caption = 'Stop "Hello"' 60 | OnExecute = actStopHelloExecute 61 | OnUpdate = actStopHelloUpdate 62 | end 63 | object actChangeMessage: TAction 64 | Caption = 'Change message' 65 | OnExecute = actChangeMessageExecute 66 | OnUpdate = actChangeMessageUpdate 67 | end 68 | end 69 | object OmniEventMonitor1: TOmniEventMonitor 70 | OnTaskMessage = OmniEventMonitor1TaskMessage 71 | OnTaskTerminated = OmniEventMonitor1TaskTerminated 72 | Left = 48 73 | Top = 248 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /tests/04_TwoWayHello_with_package/test_4_TwoWayHello_with_package.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTwoWayHello: TfrmTestTwoWayHello 2 | Left = 0 3 | Top = 0 4 | Caption = 'Two way hello w/ package' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnClose = FormClose 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 104 19 | Top = 0 20 | Width = 322 21 | Height = 286 22 | Align = alRight 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartHello: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 90 30 | Height = 25 31 | Action = actStartHello 32 | TabOrder = 1 33 | end 34 | object btnStopHello: TButton 35 | Left = 8 36 | Top = 70 37 | Width = 90 38 | Height = 25 39 | Action = actStopHello 40 | TabOrder = 2 41 | end 42 | object btnChangeMessage: TButton 43 | Left = 8 44 | Top = 39 45 | Width = 90 46 | Height = 25 47 | Action = actChangeMessage 48 | TabOrder = 3 49 | end 50 | object ActionList: TActionList 51 | Left = 8 52 | Top = 248 53 | object actStartHello: TAction 54 | Caption = 'Start "Hello"' 55 | OnExecute = actStartHelloExecute 56 | OnUpdate = actStartHelloUpdate 57 | end 58 | object actStopHello: TAction 59 | Caption = 'Stop "Hello"' 60 | OnExecute = actStopHelloExecute 61 | OnUpdate = actStopHelloUpdate 62 | end 63 | object actChangeMessage: TAction 64 | Caption = 'Change message' 65 | OnExecute = actChangeMessageExecute 66 | OnUpdate = actChangeMessageUpdate 67 | end 68 | end 69 | object OmniEventMonitor1: TOmniEventMonitor 70 | OnTaskMessage = OmniEventMonitor1TaskMessage 71 | OnTaskTerminated = OmniEventMonitor1TaskTerminated 72 | Left = 48 73 | Top = 248 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /tests/06_TwoWayHello_with_object_worker/test_6_TwoWayHello_with_object_worker.dfm: -------------------------------------------------------------------------------- 1 | object frmTestTwoWayHello: TfrmTestTwoWayHello 2 | Left = 0 3 | Top = 0 4 | Caption = 'Two way hello w/ object worker' 5 | ClientHeight = 286 6 | ClientWidth = 426 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnClose = FormClose 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 104 19 | Top = 0 20 | Width = 322 21 | Height = 286 22 | Align = alRight 23 | ItemHeight = 13 24 | TabOrder = 0 25 | end 26 | object btnStartHello: TButton 27 | Left = 8 28 | Top = 8 29 | Width = 90 30 | Height = 25 31 | Action = actStartHello 32 | TabOrder = 1 33 | end 34 | object btnStopHello: TButton 35 | Left = 8 36 | Top = 70 37 | Width = 90 38 | Height = 25 39 | Action = actStopHello 40 | TabOrder = 2 41 | end 42 | object btnChangeMessage: TButton 43 | Left = 8 44 | Top = 39 45 | Width = 90 46 | Height = 25 47 | Action = actChangeMessage 48 | TabOrder = 3 49 | end 50 | object ActionList: TActionList 51 | Left = 8 52 | Top = 248 53 | object actStartHello: TAction 54 | Caption = 'Start "Hello"' 55 | OnExecute = actStartHelloExecute 56 | OnUpdate = actStartHelloUpdate 57 | end 58 | object actStopHello: TAction 59 | Caption = 'Stop "Hello"' 60 | OnExecute = actStopHelloExecute 61 | OnUpdate = actStopHelloUpdate 62 | end 63 | object actChangeMessage: TAction 64 | Caption = 'Change message' 65 | OnExecute = actChangeMessageExecute 66 | OnUpdate = actChangeMessageUpdate 67 | end 68 | end 69 | object OmniEventMonitor1: TOmniEventMonitor 70 | OnTaskMessage = OmniEventMonitor1TaskMessage 71 | OnTaskTerminated = OmniEventMonitor1TaskTerminated 72 | Left = 48 73 | Top = 248 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /tests/13_Exceptions/test_13_Exceptions.dfm: -------------------------------------------------------------------------------- 1 | object frmTestExceptions: TfrmTestExceptions 2 | Left = 0 3 | Top = 0 4 | Caption = 'Exception tester' 5 | ClientHeight = 306 6 | ClientWidth = 611 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object lbLog: TListBox 18 | Left = 143 19 | Top = 0 20 | Width = 468 21 | Height = 306 22 | Align = alRight 23 | Anchors = [akLeft, akTop, akRight, akBottom] 24 | ItemHeight = 13 25 | TabOrder = 0 26 | end 27 | object btnAV: TButton 28 | Left = 8 29 | Top = 8 30 | Width = 129 31 | Height = 25 32 | Caption = 'Access violation' 33 | TabOrder = 1 34 | OnClick = RunTest 35 | end 36 | object btnRC: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 129 40 | Height = 25 41 | Caption = 'Range check' 42 | TabOrder = 2 43 | OnClick = RunTest 44 | end 45 | object btnCustomException: TButton 46 | Left = 8 47 | Top = 70 48 | Width = 129 49 | Height = 25 50 | Caption = 'Custom' 51 | TabOrder = 3 52 | OnClick = RunTest 53 | end 54 | object btnInitException: TButton 55 | Left = 8 56 | Top = 118 57 | Width = 129 58 | Height = 25 59 | Caption = 'Init exception' 60 | TabOrder = 4 61 | OnClick = RunObjectTest 62 | end 63 | object btnCleanupException: TButton 64 | Left = 8 65 | Top = 149 66 | Width = 129 67 | Height = 25 68 | Caption = 'Cleanup exception' 69 | TabOrder = 5 70 | OnClick = RunObjectTest 71 | end 72 | object cbThreadPool: TCheckBox 73 | Left = 8 74 | Top = 223 75 | Width = 97 76 | Height = 17 77 | Caption = 'Use thread pool' 78 | TabOrder = 6 79 | end 80 | object OmniTED: TOmniEventMonitor 81 | OnTaskMessage = OmniTEDTaskMessage 82 | Left = 8 83 | Top = 264 84 | end 85 | end 86 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryPackages.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {36c4368c-5c36-4ea5-beb7-0bbc10ba4bf7} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Default.Personality 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryPackagesXE.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {6769E2B0-8F51-4BCC-AF02-BADA30BF6605} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /examples/stringlist parser/StringListParser1.dfm: -------------------------------------------------------------------------------- 1 | object frmStringListParser: TfrmStringListParser 2 | Left = 0 3 | Top = 0 4 | Caption = 'StringList Parser' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object lblInstructions: TLabel 19 | Left = 8 20 | Top = 35 21 | Width = 410 22 | Height = 26 23 | Caption = 24 | 'Enter '#39'!'#39' in the edit above (anywhere in the string) to simulate' + 25 | ' cancellation from the task worker' 26 | WordWrap = True 27 | end 28 | object lbLog: TListBox 29 | Left = 0 30 | Top = 68 31 | Width = 635 32 | Height = 269 33 | Align = alBottom 34 | Anchors = [akLeft, akTop, akRight, akBottom] 35 | ItemHeight = 13 36 | TabOrder = 0 37 | end 38 | object inpString: TEdit 39 | Left = 8 40 | Top = 8 41 | Width = 410 42 | Height = 21 43 | TabOrder = 1 44 | Text = 'DelphiDelphiDelphiDelphi' 45 | end 46 | object btnProcess: TButton 47 | Left = 424 48 | Top = 6 49 | Width = 122 50 | Height = 25 51 | Caption = 'Process (Low Level)' 52 | TabOrder = 2 53 | OnClick = btnProcessClick 54 | end 55 | object btnCancelLL: TButton 56 | Left = 552 57 | Top = 6 58 | Width = 75 59 | Height = 25 60 | Caption = 'Cancel' 61 | TabOrder = 3 62 | OnClick = btnCancelLLClick 63 | end 64 | object btnProcessHL: TButton 65 | Left = 424 66 | Top = 37 67 | Width = 122 68 | Height = 25 69 | Caption = 'Process (High Level)' 70 | TabOrder = 4 71 | OnClick = btnProcessHLClick 72 | end 73 | object btnCancelHL: TButton 74 | Left = 552 75 | Top = 37 76 | Width = 75 77 | Height = 25 78 | Caption = 'Cancel' 79 | TabOrder = 5 80 | OnClick = btnCancelHLClick 81 | end 82 | end 83 | -------------------------------------------------------------------------------- /bag of stuff/release-1.05a.txt: -------------------------------------------------------------------------------- 1 | OmniThreadLibrary 1.05a has just been released. It is available via 2 | SVN (http://omnithreadlibrary.googlecode.com/svn/tags/release-1.05a) or 3 | as a ZIP archive 4 | (http://code.google.com/p/omnithreadlibrary/downloads/list). 5 | 6 | What is OmniThreadLibrary? 7 | ========================== 8 | 9 | OmniThreadLibrary is simple to use threading library for Delphi. It's 10 | main "selling" points (besides the price, of course are power, 11 | simplicity, and openess. With just few lines of code, you can set up 12 | multiple threads, send messages between them, process Windows messages 13 | and more. OmniThreadLibrary doesn't limit you in any way - if it is not 14 | powerfull enough for you, you can ignore any part of its "smartness" 15 | and replace it with your own code. 16 | 17 | OmniThreadLibrary is an open source project. It lives in the Google 18 | Code and is licensed under the BSD license. 19 | 20 | At the moment, OmniThreadLibrary supports Delphi 2007, 2009, and 2010 21 | on the Win32 platform. Currently, there are no plans to support older 22 | Delphi compilers and .NET. 23 | 24 | Where can I get more imformation? 25 | ================================= 26 | 27 | Home page: http://otl.17slon.com/ 28 | Web discussion forum: http://otl.17slon.com/forum/ 29 | Downloads: http://code.google.com/p/omnithreadlibrary/downloads/list 30 | Issue tracker: http://code.google.com/p/omnithreadlibrary/issues/list 31 | SVN checkout instructions: 32 | http://code.google.com/p/omnithreadlibrary/source/checkout 33 | Author's blog: http://thedelphigeek.com 34 | Author's home page: http://gp.17slon.com 35 | 36 | Changes since version 1.05 37 | =========================== 38 | 39 | - Bug fixed: TOmniTaskControl.OnMessage(eventHandler: 40 | TOmniTaskMessageEvent) was broken. 41 | - Bug fixed: TOmniTaskControl.OnMessage/OnTerminate uses event monitor 42 | created in the context of the task controller thread (was using 43 | global event monitor created in the main thread). 44 | - Implemented TOmniEventMonitorPool, per-thread TOmniEventMonitor 45 | allocator. 46 | 47 | --- 48 | Primoz 49 | [http://thedelphigeek.com] -------------------------------------------------------------------------------- /packages/OmniThreadLibraryPackagesXE2.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {6769E2B0-8F51-4BCC-AF02-BADA30BF6605} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryPackages2009.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {6769E2B0-8F51-4BCC-AF02-BADA30BF6605} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryPackages2010.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {6769E2B0-8F51-4BCC-AF02-BADA30BF6605} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /examples/forEach output/ForEachOutput1.pas: -------------------------------------------------------------------------------- 1 | unit ForEachOutput1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, 7 | Generics.Collections, 8 | OtlCommon, 9 | OtlCollections, 10 | OtlParallel; 11 | 12 | type 13 | TTransaction = class 14 | Transaction: string; 15 | constructor Create(const transact: string); 16 | end; 17 | 18 | TfrmForEachOutput = class(TForm) 19 | ListBox1: TListBox; 20 | procedure FormCreate(Sender: TObject); 21 | end; 22 | 23 | var 24 | frmForEachOutput: TfrmForEachOutput; 25 | 26 | implementation 27 | 28 | {$R *.dfm} 29 | 30 | procedure ProcessTransactions(input: TStringList; output: TList); 31 | var 32 | outQueue : IOmniBlockingCollection; 33 | transaction: TOmniValue; 34 | begin 35 | outQueue := TOmniBlockingCollection.Create; 36 | Parallel.ForEach(0, input.Count - 1).NoWait.PreserveOrder.Into(outQueue).Execute( 37 | procedure(const value: integer; var result: TOmniValue) 38 | begin 39 | result := TTransaction.Create(input[value]); 40 | end 41 | ); 42 | for transaction in outQueue do 43 | output.Add(transaction.AsObject as TTransaction); 44 | end; 45 | 46 | procedure TfrmForEachOutput.FormCreate(Sender: TObject); 47 | var 48 | bankStatements: TStringList; 49 | ch : char; 50 | transaction : TTransaction; 51 | transactions : TList; 52 | begin 53 | bankStatements := TStringList.Create; 54 | try 55 | for ch := '1' to '9' do bankStatements.Add(ch); //for testing 56 | transactions := TList.Create; 57 | try 58 | ProcessTransactions(bankStatements, transactions); 59 | for transaction in transactions do begin 60 | ListBox1.Items.Add(transaction.Transaction); 61 | transaction.Free; 62 | end; 63 | finally FreeAndNil(transactions); end; 64 | finally FreeAndNil(bankStatements); end; 65 | end; 66 | 67 | { TTransaction } 68 | 69 | constructor TTransaction.Create(const transact: string); 70 | begin 71 | Transaction := transact; 72 | end; 73 | 74 | end. 75 | 76 | -------------------------------------------------------------------------------- /tests/39_Futures/test_39_Futures.dfm: -------------------------------------------------------------------------------- 1 | object frmFuturesDemo: TfrmFuturesDemo 2 | Left = 0 3 | Top = 0 4 | Caption = ' ' 5 | ClientHeight = 337 6 | ClientWidth = 635 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object btnTestFuture1: TButton 18 | Left = 8 19 | Top = 8 20 | Width = 89 21 | Height = 25 22 | Caption = 'Future Primes' 23 | TabOrder = 0 24 | OnClick = btnTestFuture1Click 25 | end 26 | object lbLog: TListBox 27 | Left = 103 28 | Top = 0 29 | Width = 532 30 | Height = 337 31 | Align = alRight 32 | Anchors = [akLeft, akTop, akRight, akBottom] 33 | ItemHeight = 13 34 | TabOrder = 1 35 | end 36 | object btnTestFuture2: TButton 37 | Left = 8 38 | Top = 39 39 | Width = 89 40 | Height = 25 41 | Caption = 'Future Primes' 42 | TabOrder = 2 43 | OnClick = btnTestFuture2Click 44 | end 45 | object btnTestFuture3: TButton 46 | Left = 8 47 | Top = 70 48 | Width = 89 49 | Height = 25 50 | Caption = 'Future Primes' 51 | TabOrder = 3 52 | OnClick = btnTestFuture3Click 53 | end 54 | object btnTestFuture4: TButton 55 | Left = 8 56 | Top = 101 57 | Width = 89 58 | Height = 25 59 | Caption = 'Future Primes' 60 | TabOrder = 4 61 | OnClick = btnTestFuture4Click 62 | end 63 | object btnTestFuture5: TButton 64 | Left = 8 65 | Top = 132 66 | Width = 89 67 | Height = 25 68 | Caption = 'Future Primes' 69 | TabOrder = 5 70 | OnClick = btnTestFuture5Click 71 | end 72 | object btnTestFuture6: TButton 73 | Left = 8 74 | Top = 163 75 | Width = 89 76 | Height = 25 77 | Caption = 'Future Primes' 78 | TabOrder = 6 79 | OnClick = btnTestFuture6Click 80 | end 81 | object btnTestFuture7: TButton 82 | Left = 8 83 | Top = 194 84 | Width = 89 85 | Height = 25 86 | Caption = 'Future Primes' 87 | TabOrder = 7 88 | OnClick = btnTestFuture7Click 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /tests/01_HelloWorld/test_1_HelloWorld.pas: -------------------------------------------------------------------------------- 1 | unit test_1_HelloWorld; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, ActnList, 8 | OtlCommon, 9 | OtlTask, 10 | OtlTaskControl, 11 | OtlEventMonitor, OtlComm; 12 | 13 | type 14 | TfrmTestHelloWorld = class(TForm) 15 | btnHello : TButton; 16 | lbLog : TListBox; 17 | procedure btnHelloClick(Sender: TObject); 18 | procedure FormCreate(Sender: TObject); 19 | strict private 20 | FMessageDispatch: TOmniEventMonitor; 21 | private 22 | procedure HandleTaskTerminated(const task: IOmniTaskControl); 23 | procedure HandleTaskMessage(const task: IOmniTaskControl; const msg: TOmniMessage); 24 | procedure RunHelloWorld(const task: IOmniTask); 25 | end; 26 | 27 | var 28 | frmTestHelloWorld: TfrmTestHelloWorld; 29 | 30 | implementation 31 | 32 | uses 33 | DSiWin32; 34 | 35 | {$R *.dfm} 36 | 37 | { TfrmTestOTL } 38 | 39 | procedure TfrmTestHelloWorld.btnHelloClick(Sender: TObject); 40 | begin 41 | btnHello.Enabled := false; 42 | FMessageDispatch.Monitor(CreateTask(RunHelloWorld, 'HelloWorld')).Run; 43 | end; 44 | 45 | procedure TfrmTestHelloWorld.FormCreate(Sender: TObject); 46 | begin 47 | FMessageDispatch := TOmniEventMonitor.Create(Self); 48 | FMessageDispatch.OnTaskMessage := HandleTaskMessage; 49 | FMessageDispatch.OnTaskTerminated := HandleTaskTerminated; 50 | end; 51 | 52 | procedure TfrmTestHelloWorld.HandleTaskTerminated(const task: IOmniTaskControl); 53 | begin 54 | lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] Terminated', [task.UniqueID, task.Name])); 55 | btnHello.Enabled := true; 56 | end; { TfrmTestOTL.HandleTaskTerminated } 57 | 58 | procedure TfrmTestHelloWorld.HandleTaskMessage(const task: IOmniTaskControl; const msg: 59 | TOmniMessage); 60 | begin 61 | lbLog.ItemIndex := lbLog.Items.Add(Format('[%d/%s] %d|%s', 62 | [task.UniqueID, task.Name, msg.msgID, msg.msgData.AsString])); 63 | end; 64 | 65 | procedure TfrmTestHelloWorld.RunHelloWorld(const task: IOmniTask); 66 | begin 67 | //Executed in a background thread 68 | task.Comm.Send(0, 'Hello, world!'); 69 | end; 70 | 71 | initialization 72 | Randomize; 73 | end. 74 | -------------------------------------------------------------------------------- /packages/OmniThreadLibraryPackagesXE3.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {28D57D2B-AABB-4149-8F7F-D320921D992B} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | --------------------------------------------------------------------------------