java - Difference between Thread.currentThread().getId() and Kernel32.INSTANCE.GetCurrentThreadId() -


what difference between following 2 lines of code thread id?

thread.currentthread().getid(); kernel32.instance.getcurrentthreadid(); 

to abstract underlying platform jvm sits on top of operating system. w32api os interface/library implemented java , kernel32.instance.getcurrentthreadid() gives id of operating system thread calling line. java language provides mechanisms multi-threading. thread.currentthread().getid() gives id of jvm thread. depending on implementation of w32api- of kernel32 one- , maybe other factors os threads may or may not map vm threads.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -