Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
packages
tools
anonsurf
Commits
0b597ab0
Commit
0b597ab0
authored
Aug 26, 2021
by
Nong Hoang Tu
Browse files
Force remove after stop because of threading problem
parent
d891c097
Pipeline
#3786
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nimsrc/anonsurf/gtk/gui_activities/main_widget_activities.nim
View file @
0b597ab0
...
...
@@ -4,15 +4,16 @@ import .. / .. / cores / handle_killapps
import
..
/
ansurf_objects
import
..
/
widgets
/
tor_status_widget
let
cb_kill_apps
=
init_gtk_askkill
()
#
proc do_anonsurf_start(cb_send_msg: proc) {.gcsafe.} =
#
ansurf_acts_handle_start("gksudo",
cb_kill_apps,
cb_send_msg)
proc
do_anonsurf_start
(
cb_send_msg
:
proc
)
{.
gcsafe
.}
=
ansurf_acts_handle_start
(
"gksudo"
,
cb_send_msg
)
#
proc do_anonsurf_stop(cb_send_msg: proc) {.gcsafe.} =
#
ansurf_acts_handle_stop("gksudo",
cb_kill_apps,
cb_send_msg)
proc
do_anonsurf_stop
(
cb_send_msg
:
proc
)
{.
gcsafe
.}
=
ansurf_acts_handle_stop
(
"gksudo"
,
cb_send_msg
)
proc
do_anonsurf_restart
(
cb_send_msg
:
proc
)
{.
gcsafe
.}
=
...
...
@@ -29,17 +30,15 @@ proc do_anonsurf_checkip(cb_send_msg: proc) {.gcsafe.} =
proc
ansurf_gtk_do_start_stop
*
(
b
:
Button
,
cb_send_msg
:
proc
)
=
if
b
.
label
==
"Start"
:
# createThread(ansurf_workers_common, do_anonsurf_start,
cb_send_msg)
ansurf_acts_handle_start
(
"gksudo"
,
cb_kill_apps
,
cb_send_msg
)
cb_kill_apps
(
cb_send_msg
)
createThread
(
ansurf_workers_common
,
do_anonsurf_start
,
cb_send_msg
)
else
:
# createThread(ansurf_workers_common, do_anonsurf_stop, cb_send_msg)
ansurf_acts_handle_stop
(
"gksudo"
,
cb_kill_apps
,
cb_send_msg
)
# joinThread(ansurf_workers_common)
createThread
(
ansurf_workers_common
,
do_anonsurf_stop
,
cb_send_msg
)
cb_kill_apps
(
cb_send_msg
)
proc
ansurf_gtk_do_restart
*
(
b
:
Button
,
cb_send_msg
:
proc
)
=
createThread
(
ansurf_workers_common
,
do_anonsurf_restart
,
cb_send_msg
)
# ansurf_workers_common.joinThread()
proc
ansurf_gtk_do_myip
*
(
b
:
Button
,
cb_send_msg
:
proc
)
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment