Kaiser wrote:Okay so... what's Mutex and how to use it? I'm sure there have been people who have done apps that require network functions and handling GUI at the same time... using PB 3.94! 

 
G'day. There are lots of chat clients written in PB3.94 and earlier that mated gui with network functions. Have a look at Pureare.net and find the codearchive and the showcase areas. I think there are still things there to help you.
And as for a mutex, it's just a flag to tell every other procedure that "This thing is in use, don't touch!!"
global mutex.l
procedure mutilatestring(name.s)
  if mutex = 0       ; If nothing else is playing with strings
    mutex = 1         ; lock it for our own use
    "Mr " + name.s  ; now do what we have to
  endif
  mutex = 0          ; Other procedures are now allowed to do string work
endprocedure
procedure stuffupaddress(address.s)
  if mutex = 0       ; If nothing else is playing with strings
    mutex = 1         ; lock it for our own use
    "No and Street " + address.s  ; now do what we have to
  endif
  mutex = 0          ; Other procedures are now allowed to do string work
endprocedure
So we have 2 procedures manipulating strings and each one tries to lock the string buffer for it's own exclusive use so that neither of the two; separate procedures; can possibly trash each other.
Okay, so what happens if you run both procedures and only one gets done because of this locking? Create a thread that monitors your variables and checks to see if they are filled before continuring on to something else. Make the thread either check and recheck that all variables are completed or make the thread re-launch the procedures from a common stack with the variables you want those procedures to finish.