Skip to content

Commit

Permalink
fix: allow getting program while run is running
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Sep 20, 2024
1 parent 1aaa032 commit 64eaa0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func (r *Run) Err() error {

// Program returns the gptscript program for the run.
func (r *Run) Program() *Program {
r.lock.Lock()
defer r.lock.Unlock()
r.callsLock.Lock()
defer r.callsLock.Unlock()
return r.program
}

Expand Down

0 comments on commit 64eaa0a

Please sign in to comment.