New feature: automatic queuing of extra threads tasks

Erel

B4X founder
Staff member
Licensed User
Longtime User
The internal thread pool was improved in Basic4android v2.00 and it will now automatically queue tasks when there are no threads available to process them.

In previous versions a RejectedExecutionException would have been raised in that case.

HttpUtils was developed to handle this issue in the application level. Now that the internal framework is responsible for the tasks queue, it will be much easier to build more flexible networking modules.

I believe that the first beta version will be released on Tuesday or Wednesday...
 

Kevin

Well-Known Member
Licensed User
Longtime User
Dumb question: Does this make HTTPUtils obsolete? Is there any harm in leaving HTTPUtils in our projects if it does?
 
Upvote 0

bluedude

Well-Known Member
Licensed User
Longtime User
Anim folder etc.

Does this version solve the problem with Zooz and the anim folder? In an earlier post you explained this had to do with B4A and resources.
 
Upvote 0

XverhelstX

Well-Known Member
Licensed User
Longtime User
Hey Erel,

Here I got a "working" example of the Samsung SPen SDK that gives an error.
I don't find the thread anymore where we discussed this but it was some fault with the internal handling of jar files in Basic4Android. (I think.)

You can download the zip file with a project and libs here:
www.rootsoftllc.com/Basic4Android/SPEN.zip

Tomas
 
Upvote 0

Smee

Well-Known Member
Licensed User
Longtime User
Does this mean that the ftp process will be able to download multitudes of files without falling over?
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Erel,
Thanks for the new release! Outstanding
Can you describe how you might use this automatic feature?
Regards,
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
In previous versions it was your (application developer) responsibility to make sure that no more than 20 threads are used at the same time. This could have happened with libraries that internally use the thread pool, like all the network related libraries.

HttpUtils was written to correctly manage the number of tasks submitted to the internal thread pool.
You can search the forum for: RejectedExecutionException. You will see several threads discussing this issue.

From now on this error should not happen as the internal framework takes care of queuing extra tasks.
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel.
This is good. I had to overcome the task pool limitation in a couple of apps myself. I appreciate all you do and your excellent support. (even dumb questions like this :))
 
Upvote 0
Top