[EMAIL PROTECTED] wrote:
On Aug 17, 2006, at 13:09 UTC, Richard wrote:

The DataAvailable event handler is probably the problem. It can, and will, allow other DataAvailable events to trigger from inside the DataAvailable Handler.

That, is disastrous.

Not necessarily.  It depends on the circumstances -- does this happen
 only if you do something to service the main event loop (as I would
 expect)?  What about if you disable background tasks?  Finally, even
if it really does fire reentrantly, whenever data comes in, that's still not a disaster as long as you're aware of it.

But it seems like we need more detail on this.

Summary: Socket bug: DataAvailable event
Status:  Verified

[kbddtmpx]
http://www.realsoftware.com/feedback/viewreport.php?reportid=kbddtmpx

=========================================

Aaron Ballman
Posted: Thu Mar 23, 2006 11:11 am

Yes, we found where the issue is, but it's rather very tricky.

http://forums.realsoftware.com/viewtopic.php?t=3320&postdays=0&postorder=asc&start=0&sid=ac8c3f1587b8aeac844894b027709830

=========================================

Workaround:

Sub DataAvailable()

 NextRead:

 If me.Busy = True Then

  me.reEntered = True

  Return

 End IF

 me.Busy = True

 // Do me.LookAhead() checks here

 Dim data As String

 data = me.ReadAll()

 parseData data

 me.Busy = False

 If me.reEntered = True Then

  me.reEntered = False

  GoTo NextRead

 End If

End Sub

[snip]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to