Author Topic: Asynchronous Commands  (Read 15736 times)

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Asynchronous Commands
« on: May 03, 2016, 00:20:45 »
Hi Mathias.

Could you please provide a list of ALL asynchronous commands in MC?

I have been bitten in the backside by several Custom/MultiScript UDCs I have been testing lately because of (maybe) asynchronous commands.

Such a list would be a great help in writing UDCs more succinctly and efficiently.

Since this request relates to Documentation (I suppose) I have a proposal to put to you:  may I email you privately (you have already PM'd me) ?

TIA

Alan

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4488
    • View Profile
    • Multi Commander
Re: Asynchronous Commands
« Reply #1 on: May 03, 2016, 11:32:07 »
It kind of depends on how you mean.

The commands by it self are not async, But FileOperation, Folder Calculation, and other things that take time are run in the background.

But UDC commands by them self are not Async. 
CustomCommands are issuing the command via the UI. (Or more like the UI is issuing the same command like the CustomCommand does) Like if the user selected the command. But since CustomCommands are only 1 lines it is normally not an issue.

On the other hand, MultiScript command CAN be run in the background. (With a special option set at the top of the script) However, Depending on what they do it can be bad to run them in the background. specially if you call CustomCommands from MultiScript. Or if They call like GetAllSelectItems. and this is done after something else that took time, Becuse if the command is run in the background the user might have navigated away. And The script will then pick up the wrong thing.

If you have a special case in mind where you have issues let me know and I will see if I can do something to make it work.

(Sure you can just mail be direct if so wanted )

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Re: Asynchronous Commands
« Reply #2 on: May 03, 2016, 18:54:14 »
Hi Mathias.

I was prompted about the async issue by this post:

   http://forum.multicommander.com/forum/index.php/topic,915.msg2720.html#msg2720
   
I do have an issue that might be affected by this.  I will start a new topic in Scripts.

Alan

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4488
    • View Profile
    • Multi Commander
Re: Asynchronous Commands
« Reply #3 on: May 03, 2016, 22:41:14 »
Ahh. Well I do not have an list of what commands do something async or not.

It all depends on how they work internally

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Re: Asynchronous Commands
« Reply #4 on: May 04, 2016, 16:56:16 »
OK, thanks Mathias.

I have raised my issue, with more detail, in the Scripts forum.

Alan