2013-06-04 15:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* tests/mt/mttest10.prg
+ allow to chose GT passing it's name as command line argument
+ initialize GT in main thread if GT needs it
(currently QTC needs initialization in main thread)
This commit is contained in:
@@ -10,6 +10,12 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-06-04 15:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* tests/mt/mttest10.prg
|
||||
+ allow to chose GT passing it's name as command line argument
|
||||
+ initialize GT in main thread if GT needs it
|
||||
(currently QTC needs initialization in main thread)
|
||||
|
||||
2013-06-04 14:20 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/gtqtc/gtqtc1.cpp
|
||||
* added workaround for missing MT synchronization in QT for XLIB
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#define THREAD_GT "XWC"
|
||||
#endif
|
||||
|
||||
proc main()
|
||||
proc main( cGT )
|
||||
local i, aThreads
|
||||
|
||||
if ! hb_mtvm()
|
||||
@@ -26,10 +26,19 @@ proc main()
|
||||
quit
|
||||
endif
|
||||
|
||||
if empty( cGT )
|
||||
cGT := THREAD_GT
|
||||
endif
|
||||
|
||||
if cGT == "QTC" .and. ! cGT == hb_gtVersion()
|
||||
/* QTC have to be initialized in main thread */
|
||||
hb_gtReload( cGT )
|
||||
endif
|
||||
|
||||
? "Starting threads..."
|
||||
aThreads := {}
|
||||
for i := 1 to 3
|
||||
aadd( aThreads, hb_threadStart( @thFunc() ) )
|
||||
aadd( aThreads, hb_threadStart( @thFunc(), cGT ) )
|
||||
? i, "=>", atail( aThreads )
|
||||
next
|
||||
|
||||
@@ -43,9 +52,13 @@ proc main()
|
||||
enddo
|
||||
return
|
||||
|
||||
proc thFunc()
|
||||
proc thFunc( cGT )
|
||||
/* allocate own GT driver */
|
||||
hb_gtReload( THREAD_GT )
|
||||
use test shared
|
||||
hb_gtReload( cGT )
|
||||
if ! dbExists( "test" ) .and. dbExists( "../test" )
|
||||
use ../test shared
|
||||
else
|
||||
use test shared
|
||||
endif
|
||||
browse()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user