[OPNFLWPLUG-694] OFP - Reuse Threads using ThreadPool in SystemNotificationListenerImpl.java Created: 19/May/16  Updated: 27/Sep/21  Resolved: 21/Jun/16

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jozef Slezák Assignee: Jozef Bacigal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5924

 Description   

Stop instantiating new thread for echo after switch connected. Rather prepare threadpool while starting OFP and reuse threads.

@Override
public void onSwitchIdleEvent(final SwitchIdleEvent notification) {
new Thread(new Runnable() {



 Comments   
Comment by Tomas Slusny [ 20/May/16 ]

(In reply to Jozef Slezák from comment #0)
> Stop instantiating new thread for echo after switch connected. Rather
> prepare threadpool while starting OFP and reuse threads.
>
> @Override
> public void onSwitchIdleEvent(final SwitchIdleEvent notification) {
> new Thread(new Runnable() {

So, when instantiating this new thread pool, what should be it's behaviour? Should it have fixed size or not limit and to just reuse previous threads when available? Also, should it automatically shutdown threads after timeout (ex. 60 seconds)?

Right now, I came up with fixed thread pool with limit of # of available processors + 1, without any automatic shutdown after timeout.

Comment by Tomas Slusny [ 24/May/16 ]

GERRIT: https://git.opendaylight.org/gerrit/#/c/39306

Generated at Wed Feb 07 20:33:08 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.