[Gambas-user] Program runs wild
Charlie
karl.reinl at ...9...
Tue Dec 21 20:09:20 CET 2004
Eilert schrieb:
>
>
> Benoit Minisini schrieb:
>
>> On Tuesday 21 December 2004 11:45, Eilert wrote:
>>
>>> Hi Benoit,
>>>
>>> malheureusement pas
>>>
>>> It still shows the same behaviour, especially when I've switched to
>>> another screen and come back after some time. But even when I stay on
>>> the same screen and wait for half an hour or more, suddenly it begins to
>>> accumulate processing power. First on one processor, then it spreads on
>>> all four (it's a Xeon).
>>>
>>> So, it can't have to do with the string processing, maybe it's the
>>> timer?
>>>
>>> Rolf
>>>
>>>
>>
>>
>> Can you send me your complete project ?
>>
>
> Sure, here it is - have fun with it :-)
>
> et bonne chance
>
> Rolf
Salut,
I think you cumulate processes ,
try that,
you have one process and you kill that process after work is done.
(I haven't had a long time test with that)
PRIVATE $sBuffer AS String
PRIVATE myWho AS Process
PUBLIC SUB Form_Open()
Form1.Title = "KwhoList 1.1"
Form1.X = 713
Form1.Y = 510
Form1.Width = 270
Form1.Height = 280
whoListeLesen
END
PUBLIC SUB Timer1_Timer()
whoListeLesen
END
PUBLIC SUB Process_Read()
'DIM t$ AS String
DIM sData AS String
DIM iPos AS Integer
READ #LAST, sData, -255
$sBuffer = $sBuffer & sData
DO
iPos = Instr($sBuffer, Chr$(10))
IF iPos = 0 THEN BREAK
ListBox1.Add(Left$($sBuffer, iPos - 1))
$sBuffer = Mid$($sBuffer, iPos + 1)
LOOP
LCDNumber1.Value = ListBox1.Count
myWho.Kill
WAIT
END
SUB whoListeLesen()
ListBox1.Clear
IF ListBox1.ForeColor = &H000000& THEN
ListBox1.ForeColor = &H005500&
ELSE
ListBox1.ForeColor = &H000000&
ENDIF
WAIT
EXEC [ "who" ] FOR READ AS myWho
END
PUBLIC SUB Form_Resize()
ListBox1.Width = Form1.Width
ListBox1.Height = Form1.Height - 50
END
More information about the User
mailing list