Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Java Thread Priority

  • 14-02-2007 03:51PM
    #1
    Registered Users, Registered Users 2 Posts: 590 ✭✭✭


    Hey,

    Anyone able to explain to me how to give an Applet permission to changes a Threads priority using setPriority(int Priority) (or any other method for that matter!)? I try changing it but it stays at priority = 4 regardless.

    I am using signed applets for this so I thought this would bypass all security permissions but obiously not.

    Hope someone can answer this.

    Thanks,
    Brendan


Comments

  • Registered Users, Registered Users 2 Posts: 41 robydrupo


    It could be prohibited by security measure... look at http://forum.java.sun.com/thread.jspa?threadID=692396&messageID=4026339

    Anyway, even if you can change the priority of a thread, you can't be sure for the execution order of the threads, because the JVM still decide that.

    (sorry for my bad english)
    robi


  • Registered Users, Registered Users 2 Posts: 590 ✭✭✭bman


    Thanks for the reply. I've since sorted it out without having to change thread priorities but I'd still be interested to find out what you have to do to allow an Applet to change a Threads priority if anyone can answer it.


Advertisement