Skip to content

Commit

Permalink
Support theadid == -2
Browse files Browse the repository at this point in the history
  • Loading branch information
peremato committed Apr 24, 2024
1 parent 0fa8e3f commit 9224122
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tutorial/docs/examples/B3/B3a.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"function endrun(run::G4Run, app::G4JLApplication)::Nothing\n",
" partName = app.generator.data.gun |> GetParticleDefinition |> GetParticleName |> String\n",
" #---end run action is called for each workwer thread and the master one\n",
" if G4Threading!G4GetThreadId() == -1\n",
" if G4Threading!G4GetThreadId() < 0\n",
" data = app.simdata[1]\n",
" #---This is the master thread, so we need to add all the simuation results-----------------\n",
" for d in app.simdata[2:end]\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorial/docs/examples/Scintillation/UserActions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ end
#---End Run Action---------------------------------------------------------------------------------
function endrun(run::G4Run, app::G4JLApplication)::Nothing
#---end run action is called for each workwer thread and the master one
if G4Threading!G4GetThreadId() == -1
if G4Threading!G4GetThreadId() < 0
data = app.simdata[1]
#---This is the master thread, so we need to add all the simuation results-----------------
for d in app.simdata[2:end]
Expand Down
2 changes: 1 addition & 1 deletion tutorial/docs/examples/TestEm3/TestEm3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
"#---End Run Action---------------------------------------------------------------------------------\n",
"function endrun(run::G4Run, app::G4JLApplication)::Nothing\n",
" #---end run action is called for each workwer thread and the master onc\n",
" if G4Threading!G4GetThreadId() == -1 \n",
" if G4Threading!G4GetThreadId() < 0 \n",
" data = app.simdata[1]\n",
" #---This is the master thread, so we need to add all the simuation results-----------------\n",
" for d in app.simdata[2:end]\n",
Expand Down

0 comments on commit 9224122

Please sign in to comment.