After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 372013 - Use pan's error log, rather than g_message(), in connection worker threads
Use pan's error log, rather than g_message(), in connection worker threads
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal enhancement
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2006-11-07 14:17 UTC by Charles Kerr
Modified: 2007-01-25 08:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A thread safe logger (3.99 KB, patch)
2006-12-26 12:46 UTC, Guilhèm Bonnefille
needs-work Details | Review
Use K Haley's approach described in comment #1 (7.72 KB, patch)
2007-01-14 03:08 UTC, Charles Kerr
committed Details | Review
Better thread safe logger (5.37 KB, patch)
2007-01-23 21:09 UTC, Guilhèm Bonnefille
none Details | Review

Comment 1 Kenneth Haley 2006-12-15 00:26:19 UTC
There are two things that can stall pan when it creates a connection.  The actual connect call and the dns lookup.  While the connect can be handled in a non-blocking manner, the dns lookup can't.  This is the reason that threads are being used for the connection attempt.  If the real problem is one of error reporting, that's an easy fix.  Just store the error in the ThreadInfo struct and output it in the idle function.
Comment 2 Guilhèm Bonnefille 2006-12-26 12:46:14 UTC
Created attachment 78898 [details] [review]
A thread safe logger

Instead of implementing the connection as a non blocking operation, I modifyed the logger in order to be able to call it from threads.
Comment 3 Charles Kerr 2007-01-02 17:11:56 UTC
I don't think that the patch in Comment #2 is safe.  The Log still
notifies the GUI of changes, and gtk+ isn't threadsafe, so those
log events may come in at the wrong time.
Comment 4 Charles Kerr 2007-01-14 03:08:24 UTC
Created attachment 80216 [details] [review]
Use K Haley's approach described in comment #1
Comment 5 Guilhèm Bonnefille 2007-01-23 21:09:06 UTC
Created attachment 81019 [details] [review]
Better thread safe logger

I effectively encountered lot of problems with my previous patch.

I reworked it. I added gdk_threads_enter()/gdk_threads_leave() calls to protect GDK calls inside the logging process.
Comment 6 Guilhèm Bonnefille 2007-01-25 08:05:23 UTC
Comment on attachment 81019 [details] [review]
Better thread safe logger

Not so better. Works sometimes.