-
Which methods should be thread safe?
I am creating a data file with methods
insertRecord
updateRecord
deleteRecord
findRecords
getSize
Which methods need to be syncronized? Any input would be appreciated..
-
Re: Which methods should be thread safe?
It depends on the degree of concurrency and lock granularity that you want
to implement. Any method that updates a resource in a way that may cause
a conflict it should be synchronized.
updateRecord and deleteRecord will have to be synchronized in all cases.
Good Luck,
Ako
"J Alder" <jAdler@feverton.gov> wrote:
>
>I am creating a data file with methods
>
>insertRecord
>
>updateRecord
>
>deleteRecord
>
>findRecords
>
>getSize
>
>Which methods need to be syncronized? Any input would be appreciated..
-
Re: Which methods should be thread safe?
Thanks for the response AKO.. I'll do it!
"Ako" <ays73@hotmail.com> wrote:
>
>It depends on the degree of concurrency and lock granularity that you want
>to implement. Any method that updates a resource in a way that may cause
>a conflict it should be synchronized.
>
>
>updateRecord and deleteRecord will have to be synchronized in all cases.
>
>Good Luck,
>
>Ako
>
>
>
>"J Alder" <jAdler@feverton.gov> wrote:
>>
>>I am creating a data file with methods
>>
>>insertRecord
>>
>>updateRecord
>>
>>deleteRecord
>>
>>findRecords
>>
>>getSize
>>
>>Which methods need to be syncronized? Any input would be appreciated..
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|