Computer Science Canada

Empty function

Author:  heythere [ Thu Jun 19, 2003 10:05 pm ]
Post subject:  Empty function

Is the empty function used to end a process

Author:  AsianSensation [ Thu Jun 19, 2003 10:13 pm ]
Post subject: 

what what what?
empty function, elaborate please.

and no, process are ended either by a flag, or by return

Author:  Andy [ Fri Jun 20, 2003 9:37 am ]
Post subject: 

no meng he meant empty, the function even though its not a function but oh well and how do u end a process with a flag? u have to return don't u?

Author:  naoki [ Fri Jun 20, 2003 9:40 am ]
Post subject: 

from what i've read, the empty function sorta checks if any processes are running. but it's kinda complicated, because u have 2 set variables in each process 2 relate 2 the condition variable, then u have 2 use the wait command b4 u use empty

putting return in a process will end it, and it works in if statements. it's prolly the way u want 2 go

Author:  Andy [ Fri Jun 20, 2003 9:46 am ]
Post subject: 

hmmm when did noaoki become the smart?

Author:  hello [ Fri Jun 20, 2003 10:49 am ]
Post subject: 

he isnt we were having that trouble with it too
because we wanted teh process to end just as a proc ended
so we looked up empty well
u need a boolean and i guess when its true it doesnt tell the process to end
when its false the empty ends the thing

Author:  heythere [ Fri Jun 20, 2003 10:53 am ]
Post subject: 

ok...
well i will go with naokis idea
but can someone epxand on it
so u have a boolean flag that will tell the process to end?

Author:  naoki [ Fri Jun 20, 2003 8:10 pm ]
Post subject: 

well i don't feel like trying but i remember a while back when hello and i were working on our game i tried using empty.

apparently, a condition variable ISN'T a boolean variable. I tried constant variables too, but no go.

or it could be, and i'm just an idiot. hope not.
neways try the tutorials, someone might've tried posting something about the whole wait, empty, signal commands.


: