Problem with perform in thread
[Migrated content. Thread originally posted on 28 September 2011]Hello,
I'm getting freeze problems in my program when i do:
perform in thread Lectura_Scanner handle in scanner-thread
call "s$balanza" using by content sca-puerto
by content sca-envio-scanner
by content sca-velocidad
by content sca-paridad
by content sca-bits-datos
by content sca-bits-parada
by reference sca-lectura
move "s$balanza" to calling-program
not on exception
The problem happens when the subthread do the call "s$balanza", the main thread gets totally freeze until the call ends. Inside "s$balanza" there is some calls to windows api to scan a COM port and the program can wait to get response from the com port and for that i put "s$balanza" in a thread.
I'm a bit lost because normally a subthread must not stop the process of the mainthread... is the reason to use different threads.