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

  • Home
  • SEARCH
  • 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 646797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:39:07+00:00 2026-05-13T21:39:07+00:00

I have a long-running multithreaded program, and I’d like to occasionally like to call

  • 0

I have a long-running multithreaded program, and I’d like to occasionally like to call a function with Profile.runcall and dump the data to a file.

The hotshot documentation states: Note: The hotshot profiler does not yet work well with threads. It is useful to use an unthreaded script to run the profiler over the code you’re interested in measuring if at all possible.

However, I’ve test having multiple threads profile a function simultaneously, and I’ve encountered no problems. In my case, the functions being profiled are all self-contained and do not spawn any additional threads during execution. And I make sure that every Profile object has its own file so that they don’t clobber each other.

So my guess is that the warning about multiple threads means that I would have problems if the function being profiled spawned additional threads itself. When I profile a test function that does spawn other threads, the spawned threads are not profiled. However, this still doesn’t seem to cause any problems, since the function being profiled seems to work just fine.

Can someone confirm or refute that hotshot is safe to run in a multithreaded program? I don’t want to deploy something that might crash later, even if it seems to pass my initial tests.

  • 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-13T21:39:08+00:00Added an answer on May 13, 2026 at 9:39 pm

    For what it’s worth, we have a setting in CubicWeb (which uses multiple threads) to enable hotshot profiling, and so far I’ve never experienced issues when enabling profiling.

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

Sidebar

Related Questions

I have a long running insert transaction that inserts data into several related tables.
I have a long-running Python server and would like to be able to upgrade
We have a long running data transfer process that is just an asp.net page
I have a long running query that returns a large data set. This query
I have a long-running task that performs a series of file operations on mounted
I have a long running loop in an unfortunately large excel file that I'm
I have a long running SQL statement that I want to run, and no
I have a long running process in VB6 that I want to finish before
I have several long running report type transactions that take 5-10 minutes. Would I
I have a long running series of operations in a .NET 2.0 BackgroundWorker thread.

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.