Are you an extension developer?

Hi everyone :slightly_smiling_face:
Probably you know that recently my two extensions (FileTools and DateTools) has some bugs in methods that work asynchronously.
So I started my research and found that AsynchUtil class from AI2 is not working and un-necessarily closing application.Then I searched on Google for ‘best’ alternatives and found two most used and working solutions for JDK 6:

  • Thread
  • AsyncTask

First I started replacing AsychUtil with Thread and did few tests and amazingly it was behaving same.
Finally I chose AsyncTask and it worked like charm and it also reduced aix size 1 kb (compiled using extension template).
Now you will be thinking that why I wrote this post.
Answer is no.
If you are a beginner in extension development and using AychUtil or Thread in your extensions then I will advice you to do some tests on various devices.
And if you find your test results unfavorable then you must have to switch to AsyncTask.Otherwise there is not any solution available in my perspective.

Thank you for reading this :heart_eyes:

6 Likes

Correct and it is all other but NOT asynchron.

Not sure what they thought to create it and call it “Async”.

Asynctask is one of the most classes I use for as example image loading.
The image utilities component loads images with the help of the async task.

3 Likes

I don’t know why some days ago Thread and AsychUtil (based on Thread) was not working and closing application.

But now it works surprisingly.
Can anyone tell me what’s going on?

1 Like

As soon as I can I text it and give you the result

Can you elaborate it more?