🔍 Code Extractor

Search Components

Full-Text: Fast keyword matching | Semantic: AI-powered understanding of intent (finds similar concepts)

Search Results for "locking"

Found 20 matching component(s)

  • function load_all_sessions

    Loads all chat session data from JSON files stored in a sessions directory into memory on application startup.

    File: /tf/active/vicechatdev/docchat/app.py

    session-management persistence initialization disk-io thread-safe
  • function update_task_progress

    Thread-safe function that updates the progress and timestamp of an active task identified by task_id in a shared dictionary.

    File: /tf/active/vicechatdev/docchat/app.py

    task-management progress-tracking thread-safe concurrency locking
  • function add_message_to_session

    Adds a message to a chat session with thread-safe locking, storing role, content, timestamp, and optional metadata/references, then persists the session to disk.

    File: /tf/active/vicechatdev/docchat/app.py

    chat session-management thread-safe messaging persistence
  • function clear_session_v1

    Clears all messages from a chat session identified by session_id, resets the session's updated timestamp, and persists the changes to disk in a thread-safe manner.

    File: /tf/active/vicechatdev/docchat/app.py

    session-management chat thread-safe persistence state-management
  • function update_session_settings

    Updates the settings (model, mode, options) for an existing chat session and persists the changes to disk.

    File: /tf/active/vicechatdev/docchat/app.py

    session-management settings persistence thread-safe chat
  • function store_uploaded_document

    Stores uploaded document metadata and content in a thread-safe application state dictionary, organized by user email and document ID.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-storage thread-safe file-upload state-management user-data
  • function get_user_uploaded_documents

    Retrieves all uploaded documents associated with a specific user from a thread-safe global application state dictionary.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-management user-data thread-safe concurrency state-management
  • function remove_uploaded_document

    Removes a specific uploaded document from the application state for a given user, with thread-safe locking and automatic cleanup of empty user entries.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-management state-management thread-safe deletion cleanup
  • function store_uploaded_document_v1

    Stores an uploaded document in a thread-safe global application state dictionary, organizing documents by user email and document ID with metadata including name, content, file type, and upload timestamp.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-storage thread-safe file-upload user-data chat-context
  • function get_uploaded_document_v1

    Retrieves a specific uploaded document for a given user from a thread-safe global application state dictionary.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-retrieval thread-safe user-data state-management locking
  • function remove_uploaded_document_v1

    Removes a specific uploaded document from a user's document collection in the application state, with thread-safe locking and automatic cleanup of empty user entries.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-management thread-safe state-management deletion cleanup
  • function create_document_v6

    Creates a new ComplexDocument instance with a unique UUID, stores it in application state with thread-safe locking, persists it to file, and logs the creation.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-management factory-method thread-safe persistence uuid
  • function get_document_v7

    Retrieves a document by its ID from an in-memory cache or loads it from persistent storage if not cached.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-retrieval caching thread-safe memory-cache persistence
  • function save_document

    Saves a document object to both in-memory application state and persistent file storage, updating its timestamp in the process.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    document-management persistence thread-safe storage state-management
  • function create_chat_session

    Creates a new chat session for a specific document section by generating a unique session ID, initializing a ChatSession object, storing it in application state with thread-safe locking, and persisting it to file.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    chat session-management thread-safe uuid state-management
  • function get_chat_session

    Retrieves a chat session by its unique session ID, first checking an in-memory cache, then falling back to loading from persistent file storage if not found in memory.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    chat session-management caching thread-safe persistence
  • function api_list_documents

    Flask API endpoint that retrieves and returns a list of all documents belonging to the authenticated user, including metadata like title, author, section count, and timestamps.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    flask api rest-api documents list
  • function api_delete_document

    REST API endpoint that deletes a document from the application state after verifying the user's ownership and authentication.

    File: /tf/active/vicechatdev/vice_ai/complex_app.py

    flask rest-api delete-endpoint document-management authentication
  • function cleanup_old_tasks_v1

    Removes tasks from the active_tasks dictionary that are older than 1 hour (3600 seconds) based on their creation timestamp, using thread-safe locking.

    File: /tf/active/vicechatdev/vice_ai/app.py

    cleanup task-management threading thread-safe memory-management
  • function store_document

    Thread-safe function that stores document information (file path, text content, metadata) in a global dictionary indexed by user email and document ID.

    File: /tf/active/vicechatdev/vice_ai/app.py

    document-storage thread-safe user-session file-management concurrent-access

Search Examples