Skip to content

Commit a649d3d

Browse files
committed
allow check if LState is closed
1 parent dc2b0ca commit a649d3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

state.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,10 @@ func NewState(opts ...Options) *LState {
13671367
return ls
13681368
}
13691369

1370+
func (ls *LState) IsClosed() bool {
1371+
return ls.stack == nil
1372+
}
1373+
13701374
func (ls *LState) Close() {
13711375
atomic.AddInt32(&ls.stop, 1)
13721376
for _, file := range ls.G.tempFiles {

0 commit comments

Comments
 (0)