1
0
Fork 0

Osmocore: Move the poll to a new function and call it from the process

This commit is contained in:
Holger Hans Peter Freyther 2010-09-11 16:14:52 +08:00
parent de142cc23c
commit 6971bcc78d
1 changed files with 11 additions and 7 deletions

View File

@ -16,16 +16,21 @@ Object subclass: OSMOCore [
ObjectMemory addDependent: self.
]
OSMOCore class >> poll [
| delay |
delay := Delay forMilliseconds: 50.
[true] whileTrue: [
self bsc_select_main: 1.
delay wait.
].
]
OSMOCore class >> startProcess [
"I start a new polling process"
| delay |
delay := Delay forMilliseconds: 500.
Process := [
[true] whileTrue: [
self bsc_select_main: 1.
" delay wait."
].
self poll.
] fork.
]
@ -51,5 +56,4 @@ Object subclass: OSMOCore [
Eval [
OSMOCore initialize.
OSMOCore startProcess
]