Issue 125 in httplib2: FileCache is not thread/multiprocess safe

18 views
Skip to first unread message

codesite...@google.com

unread,
Jan 11, 2011, 11:07:20 AM1/11/11
to httplib...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 125 by toby.o.h.white: FileCache is not thread/multiprocess safe
http://code.google.com/p/httplib2/issues/detail?id=125

As noted in the comment in the file, the FileCache may not behave well in
the presence of many threads/processes all writing to the same cache.

The patch attached fixes this (at least for POSIX systems).


Attachments:
atomic-cache.patch 5.5 KB

codesite...@google.com

unread,
Feb 11, 2011, 12:16:32 AM2/11/11
to httplib...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 125 by joe.gregorio: FileCache is not
thread/multiprocess safe
http://code.google.com/p/httplib2/issues/detail?id=125

Looks good, have you tested this under windows?

codesite...@google.com

unread,
Feb 11, 2011, 10:24:18 AM2/11/11
to httplib...@googlegroups.com

Comment #2 on issue 125 by toby.o.h...@googlemail.com: FileCache is not
thread/multiprocess safe
http://code.google.com/p/httplib2/issues/detail?id=125

Sorry, no - and I won't be likely to any time soon, I'm afraid. In
principle it should work, it just won't be thread safe on Windows - but the
existing cache isn't anyway, so it oughtn't to be any worse. Untested,
though.

Toby

codesite...@google.com

unread,
Jun 13, 2011, 2:22:05 PM6/13/11
to httplib...@googlegroups.com
Updates:
Status: Closed

Comment #3 on issue 125 by joe.gregorio: FileCache is not
thread/multiprocess safe
http://code.google.com/p/httplib2/issues/detail?id=125

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages