'. '

Talk:Privileged API

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(Comment provided by Jeffrey D Smith - via ArticleComments extension)
Line 13: Line 13:
--Jeffrey D Smith 21:48, 25 May 2009 (CEST)
--Jeffrey D Smith 21:48, 25 May 2009 (CEST)
</div>
</div>
 +
 +
Thanks for your comments, Jeffrey. The method names are relict of the actual ''Mutex'' class in [[NetBeans]] and they do not make much sense in separate example. Thus I've just changed the method names.
 +
 +
Also I've answered your question in [http://wiki.apidesign.org/index.php?title=Privileged_API&diff=2464&oldid=2461 new revision] of [[Privileged API|the page]].
 +
 +
--[[User:JaroslavTulach|JaroslavTulach]] 07:42, 26 May 2009 (UTC)

Revision as of 07:42, 26 May 2009

Comments on Privileged API <comments />


Jeffrey D Smith said ...

In the readAccess(Runnable r) method, the call to lock.lock() must occur before the try block. Also, the method name "readAccess" is confusing, because it's not acquiring a read-only mutex (multi-threading), but a read-write mutex (single threading).

How do you stop unprivileged users from using the privileged constructor, thus gaining access to the privileged API?


--Jeffrey D Smith 21:48, 25 May 2009 (CEST)

Thanks for your comments, Jeffrey. The method names are relict of the actual Mutex class in NetBeans and they do not make much sense in separate example. Thus I've just changed the method names.

Also I've answered your question in new revision of the page.

--JaroslavTulach 07:42, 26 May 2009 (UTC)

Personal tools
buy