Skip to content

Conversation

@javornikolov
Copy link
Collaborator

This is intended to resolve #46 (small fix up on top of the original proposal)

Problem occurred in multithreaded environment with shared state (class variable): OCIException: OCI8::Cursor was already closed.

  • Fixed by maintaining separate stack of open cursors per thread
  • Original solution by
    Author: Nikita Shilnikov
    Date: Fri Mar 1 02:31:16 2013 +0400
    commit: d363756
    source: github.com flash-gordon/ruby-plsql oci_ar_threaded_fix
  • Later amended to use Thread.current in order to avoid memory leaks

Problem occurred in multithreaded environment with shared state (class variable):
OCIException: OCI8::Cursor was already closed.

* Fixed by maintaining separate stack of open cursors per thread

* Original solution by
  Author:    Nikita Shilnikov <[email protected]>
  Date:      Fri Mar 1 02:31:16 2013 +0400
  commit:    d363756
  source:    github.com flash-gordon/ruby-plsql oci_ar_threaded_fix

* Later amended to use Thread.current in order to avoid memory leaks
javornikolov added a commit that referenced this pull request May 9, 2015
Fix thread safety problem in PLSQL::OCIConnection::Cursor
@javornikolov javornikolov merged commit a719cc3 into master May 9, 2015
@javornikolov javornikolov deleted the threaded-cursor-close-fix branch May 9, 2015 14:16
@javornikolov javornikolov modified the milestone: 0.6.0 Mar 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants