Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7653273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:59:23+00:00 2026-05-31T11:59:23+00:00

I use python version of libtorrent . When I run a torrent session for

  • 0

I use python version of libtorrent. When I run a torrent session for a longer time with many files, it crashes with an error:

terminate called after throwing an instance of 'boost::lock_error'
  what():  boost::lock_error

so, I thought I will wrap the torrent related function into a separate thread and when it crashes, it will kill just the thread (instead of the entire app):

from threading import Thread

class TWrapper (Thread) :
    #  ...
    def run(self):
        try:
            run_torrent_stuff()
        except:
            # print message
            pass


t = TWrapper()
t.run()
t.join()
# check if all OK with t, if not - restart again

I thought that if the library crashes, the thread will die and I will join it in the main loop. But, when the libtorrent crashes, all the application dies 🙁

Why the error escalates outside the thread?

(libtorrent is an example (real life), the question is general)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:59:25+00:00Added an answer on May 31, 2026 at 11:59 am

    Usually if thread crashes, it leads to process crash, if you want to avoid it run libtorrent in a separate process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use python -m SimpleHTTPServer when I want to run my web application locally,
I would like to use python to make system calls to programs and time
I want to use Python to access MFC document files generically? Can CArchive be
TextMate seems to use the built-in Python version I assume (sys.path doesn't work). How
I am unfortunately having to use python with version before 2.4 So I don't
Time for another newbie question, I fear. I'm attempting to use Python 3.2.2 (the
I use Python to track the version between local SQLite and remote web page.
I use Python 2.6 more than I use Leopard's default python installation, so I
I use python debugger pdb. I use emacs for python programming. I use python-mode.el.
I use python to process web page. I download the souce code of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.