How to use updatethreadcount()

22 views
Skip to first unread message

CODENAME1

unread,
Oct 18, 2016, 3:35:37 AM10/18/16
to CodenameOne Discussions
NetworkManager n = NetworkManager.getInstance();
       n.updateThreadCount(10);
        n.shutdownSync();
        n.start();

is this the right way to use updatethreadcount(). as SetThreadcount() is now deprecated.
If i use setthreadcount().. app works fine..if i use updatethreadcount() i get null pointer exception.

Kindly let meknow how to use updatethreadcount()

Shai Almog

unread,
Oct 18, 2016, 10:12:01 PM10/18/16
to CodenameOne Discussions
Just NetworkManager.updateThreadCount(4);

None of the other stuff.

I would suggest not going above 5 or even 2.

CODENAME1

unread,
Oct 18, 2016, 11:26:47 PM10/18/16
to CodenameOne Discussions

It should be written in the init(Object) method ?

Shai Almog

unread,
Oct 19, 2016, 10:02:27 PM10/19/16
to CodenameOne Discussions
Yes, that's the best place for it.
Reply all
Reply to author
Forward
0 new messages