couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1000156 - /couchdb/trunk/src/couchdb/couch_file.erl
Date Wed, 22 Sep 2010 19:45:25 GMT
Author: fdmanana
Date: Wed Sep 22 19:45:24 2010
New Revision: 1000156

URL: http://svn.apache.org/viewvc?rev=1000156&view=rev
Log:
Removing duplicated code.

Modified:
    couchdb/trunk/src/couchdb/couch_file.erl

Modified: couchdb/trunk/src/couchdb/couch_file.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_file.erl?rev=1000156&r1=1000155&r2=1000156&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_file.erl (original)
+++ couchdb/trunk/src/couchdb/couch_file.erl Wed Sep 22 19:45:24 2010
@@ -158,17 +158,7 @@ sync(Fd) ->
 %% Returns: ok
 %%----------------------------------------------------------------------
 close(Fd) ->
-    MRef = erlang:monitor(process, Fd),
-    try
-        catch unlink(Fd),
-        catch exit(Fd, shutdown),
-        receive
-        {'DOWN', MRef, _, _, _} ->
-            ok
-        end
-    after
-        erlang:demonitor(MRef, [flush])
-    end.
+    couch_util:shutdown_sync(Fd).
 
 
 delete(RootDir, Filepath) ->



Mime
View raw message