peter-lawrey/Java-Thread-Affinity — Issue #26: Improve behaviour of Mac
Author: peter-lawrey
Created: 2012-03-08 13:23:05+00:00
State: open

I don't have a Mac but everyone who has looked at this has come away with the conclusion that thread affinity is not available.

What the library should do is not fail in such an ugly manner i.e. if its not available just give an appropriate warning and move one.

On 8 March 2012 13:16, William Louth wrote:
> figured out I was missing jna.jar but now have. Is there a system property
> to resort to a different implementation on this platform?
>
> Mar 8, 2012 2:12:27 PM vanilla.java.affinity.impl.PosixJNAAffinity
> WARNING: Unable to load jna library java.lang.UnsatisfiedLinkError: Error
> looking up function 'sched_getaffinity': dlsym(0x7fff66593680,
> sched_getaffinity): symbol not found
> Mar 8, 2012 2:12:27 PM vanilla.java.affinity.AffinitySupport
> INFO: Using dummy affinity control implementation!
> Mar 8, 2012 2:12:27 PM vanilla.java.affinity.AffinityLock acquireLock
> WARNING: No reservable CPU for Thread[main,5,main]
> Mar 8, 2012 2:12:27 PM vanilla.java.affinity.AffinityLock acquireLock
> WARNING: No reservable CPU for Thread[main,5,main]
> Exception in thread "Thread-2" java.lang.IllegalStateException: cpu -1
> already bound to Thread[main,5,main]
> at vanilla.java.affinity.AffinityLock.bind(AffinityLock.java:278)
> at vanilla.java.affinity.AffinityLock.bind(AffinityLock.java:268)
> at
> vanilla.java.chronicle.impl.IndexedChronicleLatencyMain$1.run(IndexedChronicleLatencyMain.java:63)
> at java.lang.Thread.run(Thread.java:680)
> Mar 8, 2012 2:12:27 PM vanilla.java.affinity.AffinityLock bind
> INFO: Assigning cpu -1 to Thread[main,5,main]
>