how can we get the core_id of an EA in optimize mode?

 

is there any way to get the core_id of an EA that's running in optimize  mode?  

for example is there any way to include a library in an EA and use one of it's property that returns the id of core that runs the current EA?