Jump to content

Recommended Posts

Posted

I've seen where attempts to perform asynchronous callbacks yield undesirable results. For example --


I've experienced similar results with my attempts to use asynchronous callbacks to implement websockets. Looking at the documentation, there isn't any indication that DllCallbackRegister is limited to synchronous operations only. However, there is @Melba23's comment here from 10 years ago.

This appears to be a timing issue because the callback will often occur properly without causing a crash. Does anyone know if this the developers have looked into this to see if it can be fixed?

 

Posted

This question should be asked to @jpm or @Jon.
Hope they found some spare time to look here and in the code to answer your question.
Be patient.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Hi,

thanks for puting some work on the table,

If you want we look at it please open a ticket with a repro script

Cheers

Posted

Thanks, Iwas not seing it was related with ticket #3952

Not sure I can find the solution 

Cheers

Posted

This is a performance issue. Optimize the _WS_Send() function in WebSocketAsio.au3 this way:

Func _WS_Send($sData)
  Return DllCall($hWEBSOCKDLL, $c_ret_size_t, "websocket_send", "wstr", $sData, "USHORT", StringLen($sData), "BOOL", 0)[0]
EndFunc

Other functions involved in asynchronous callback must be similarly optimized.

Also remove the Sleep(10) line in the For loop in reproduce.au3.

It's exactly the same problem as in the Subclassing bug.

Posted (edited)
  On 4/24/2023 at 2:12 PM, Danp2 said:

Confused as to why this isn't considered a bug.

Expand  

It waited for confirmation. Finally @jpm closed this ticket due to no response.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

The workaround fail if more loop 100 to  10000.

I will leave the final answer to @Jon as it is beyond my competence.

Suppressing all consolewrite will produce error

Posted (edited)

@Janeer good first post 👍

EDIT Jos: Pity it was a placeholder for spam. :( 

 :welcome:2️⃣logo_autoit_210x72.svg4️⃣um

Edited by Jos

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
Posted

Thinking about the pb, I think that the serialisation of the callback code must me handle inside the callback.

I am almost sure that execution of a new callback, the previous one not completely handled, will produce conflict

Good luck with the @Janeer proposal which look to me very sensible

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...