This is an automated email from the ASF dual-hosted git repository.

lizhimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new e9762905 [ISSUE #1083] [Golang] Triggering the judgment whether it is 
empty during task execution (#1084)
e9762905 is described below

commit e97629054d9a5315290c5ca71fa37961f8f9957d
Author: takagi <[email protected]>
AuthorDate: Thu Sep 4 10:06:55 2025 +0800

    [ISSUE #1083] [Golang] Triggering the judgment whether it is empty during 
task execution (#1084)
    
    Co-authored-by: weilin <[email protected]>
---
 golang/simple_thread_pool.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/golang/simple_thread_pool.go b/golang/simple_thread_pool.go
index 8f8d51d5..bccd7121 100644
--- a/golang/simple_thread_pool.go
+++ b/golang/simple_thread_pool.go
@@ -54,7 +54,9 @@ func NewSimpleThreadPool(poolName string, taskSize int, 
threadNum int) *simpleTh
                                        }
                                        return
                                case t := <-tp.tasks:
-                                       t()
+                                       if t != nil {
+                                               t()
+                                       }
                                }
                        }
                }()

Reply via email to