Skip to content

Handle printing in @precompile_all_calls #308

@carstenbauer

Description

@carstenbauer

I recently added a @precompile_all_calls block to ThreadPinning.jl which contains typical calls that I want to be precompiled. One of them was (it's not there anymore) threadinfo() which essentially only prints things (specifically the system topology + where Julia threads are currently running). While this seemed fine at first, I noticed that when the package precompilation is triggered by using ThreadPinning instead of the (arguably more common) ] add ThreadPinning (or ] precompile) I would now see the printing output of the snoop-precompile block. I find this to be somewhat annoying which is why I dropped the threadinfo() call. However, this seems to be a general issue that might be worth a fix.

A straightforward solution to the issue would be to redirect all printing by the snoop-precompile block to /dev/null or similar. I guess the question then is whether there are cases where one actually wants to see the printing output. (I can't think of any but what do I know 😄).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions