OSGi Threading Model

后端 未结 4 1187
独厮守ぢ
独厮守ぢ 2021-02-14 15:13

I have searched the Internet but failed to find a satisfactory answer. What is the threading model present in an OSGi container? Does it simply spawn a new thread to each regist

4条回答
  •  孤街浪徒
    2021-02-14 15:53

    Besides some special cases (Events/Listeners) the application threads are neighter managed nor restricted. You can use threading freely. You do need to be aware that some operations in the bundle lifecylce must be (therefore) thread safe and you need to be very carefull to tear down threads cleanly. You also need to be carefull not to block OSGi operations needlessly long.

提交回复
热议问题